eclipse环境下如何配置tomcat

  1. 打开Eclipse,单击“Window”菜单,选择下方的“Preferences”。

  2. 单击“Server”选项,选择下方的“Runtime Environments”。

  3. 点击“Add”添加Tomcat。

  4. 点击“Next”,选中自己安装的Tomcat路径。

  5. 点击“Finish”完成。

建立一个Web应用

  1. FileNewDynamic Web Project

  2. 创建一个Dynamic Web Project

  3. 点击“Next”下一步

  4. 点击“Next”下一步

  5. 点击“Finish”完成

让Tomcat服务器显示在控制台上,将Web应用部署到Tomcat中

  1. WindowShow ViewServers

  2. 点击链接No servers are available. Click ths link to create a new server. ,在弹出的对话框中选择Tomcat版本

  3. 点击“Next”,添加我们的项目



    选中项目并点击Add,或是双击都可以添加到右边
  4. 点击“Finish”完成

    返回下方的“Servers”面板,右键单击该面板中的“Tomcat v8.0 Server at localhost”节点,在弹出的快捷菜单中单击“Start”,即可启动指定的Web服务器。如果此时直接启动访问http://localhost:8080/TomcatTest ,会发现会报404的错误。这是因为我们没有添加主页,下面添加主页(index.jsp)的内容:

    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>欢迎页面</title>
    </head>
    <body>
    欢迎使用eclipse部署Tomcat。
    </body>
    </html>
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

    注意:web资源一定要在WebRoot目录下添加。如图:



    此时,再一次来访问该链接:http://localhost:8080/TomcatTest ,效果如下:

(转载)(DescriptionResource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not foun的更多相关文章

  1. Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" was not foun

    一段时间没亲自建新项目玩乐,今天建立了一Maven project的时候发现了以下异常,Description Resource Path Location Type The superclass & ...

  2. HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet& ...

  3. [转]The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    完整错误信息: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY ...

  4. 使用maven创建项目时报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    Description Resource Path Location Type The superclass "javax.servlet.http.HttpServlet" wa ...

  5. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决方案

    0.环境: win7系统,Tomcat9配置无误. 1.错误: 项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http.Htt ...

  6. eclipse:报错信息The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

    JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bui ...

  7. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。问题

    JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Ja ...

  8. 错误:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    我们在利用Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on ...

  9. ubuntu下eclipse遇到The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Ja ...

随机推荐

  1. 006、Java中定义中文变量中文标识符

    01.代码如下 package TIANPAN; /** * 此处为文档注释 * * @author 田攀 微信382477247 */ public class TestDemo { public ...

  2. idea基于springboot搭建ssm(maven)

    版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/liboyang71/article/det ...

  3. 百度杀毒停止下载,个人PC杀毒软件真的走到尽头了吗?

    在时代浪潮的席卷下,不适应的服务和产品终将被淘汰.诺基亚如此,杀毒软件亦是如此.就在近日,久久沉寂的杀毒软件市场被投下一颗重磅炸弹--百度杀毒软件官网PC端不再提供下载,但手机端依然提供下载和杀毒服务 ...

  4. spring-@ResponseBody返回时的编码处理

    下面是一个解决方案 @RequestMapping(value = "/queryall", method = GET, produces = "application/ ...

  5. DRF项目之通过业务逻辑选择数据集和序列化器

    在REST后台开发中,我们需要通过业务逻辑来选择数据集或者序列化器. 选择数据集: # 重写get_queryset实现通过业务逻辑选择指定数据集 def get_queryset(self): '' ...

  6. Vulkan SDK 之Render Pass

    Create a Render Pass A render pass describes the scope of a rendering operation by specifying the co ...

  7. T_SQL 获取系统当前时间与明天时间的两种格式

    --获取系统明天的时间 select CONVERT(nvarchar(20),dateadd(d,1,getdate()),120)         2017-01-21 15:04:10 sele ...

  8. js 工厂设计模式

    class Product{ constructor(name){ this.name = name; } init(){ alert(this.name); } } function Creator ...

  9. 【pwnable.kr】 flag

    pwnable从入门到放弃 第四题 Download : http://pwnable.kr/bin/flag 下载下来的二进制文件,对着它一脸懵逼,题目中说是逆向题,这我哪会啊... 用ida打开看 ...

  10. Vue点击按钮下载对应图片

    最近有用到点击某个按钮 自动下载对应图片,可是对于浏览器不同的问题,会有‘个别’浏览器出现不能下载的或者下载的效果不同等的问题, 可以直接用创建canvas方法: 定义图片地址Img: "w ...