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. ASP.NETCore -----导出Excel文件并下载

    本事例分为nopi(安装DotNetCore.NPOI)下载和EPPlus(EPPlus.Core.dll)下载,其中npoi下载演示的是根据执行的模板进行数据下载 npoi帮助类NpoiExcelU ...

  2. spark sortShuffleWriter源码学习

    查看的源码为spark2.3 调用ShuffleMapTask的runTask方法 org.apache.spark.scheduler.ShuffleMapTask#runTask ShuffleM ...

  3. ORACLE SQL DEVELOPER配置

    1.首先,sql developer是用java开发的 所以闲进行java配置. 如果首次打开提醒需要配置java环境 那就选择对应的目录即可. 如果不提示 那就忽略以上内容. 首次打开 会提示 是否 ...

  4. python三大神器===》装饰器

    1.认识装饰器 如果你经常看我的博客,你已经学会了python的前两大‘神器’(迭代器,生成器),那么什么是装饰器呢?就如字面意义装饰器是对某个事物(通常指函数)进行装饰,让其在不修改任何内部代码的情 ...

  5. Spring入门之三-------SpringIoC之Scopes

    一.singleton和prototype public class Bean1 { public Bean1() { System.out.println(this.getClass().getSi ...

  6. cf 764A、762A、764B

    颓废题 764A #include<bits/stdc++.h> #define LL long long #define N 100005 #define lowbit(x) x& ...

  7. cf 763B. Timofey and rectangles

    %%题解,脑洞好大啊. 四色定理什么鬼的..所以一定是yes. 因为矩形边长都是奇数,所以可以按左下角分类,一共4类,分别1,2,3,4就可以了. (需要4种颜色的情况大概就是4个矩形围起来一个矩形) ...

  8. redis常用的命令行以及操作

    redis常用的命令行以及操作 转载酱紫人的理直气壮 最后发布于2018-07-30 17:00:41 阅读数 805  收藏 转载地址:https://blog.csdn.net/li_lening ...

  9. Java语言学习总结 扩展篇 包装类的概念及其使用

    包装类 包装类的概述 Java提供了两个类型系统,基本类型与引用类型,使用基本类型在于效率,然而很多情况,会创建对象使用,因为对象可以做更多的功能,如果想要我们的基本类型像对象一样操作,就可以使用基本 ...

  10. 二十六、SAP中通过FORMAT COLOR来设置文字背景颜色

    一.代码如下 二.效果如下