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. MyBatis笔记(一)

    MyBatis学习随笔 第一个MyBatis项目 创建项目 导入maven依赖,根据需要选择性添加mysql/oracle,spring,spring-mybatis等依赖,这里就不一一列出了 < ...

  2. 吴裕雄--天生自然java开发常用类库学习笔记:System类

    public class SystemDemo01{ public static void main(String args[]){ long startTime = System.currentTi ...

  3. Golang的运算符-比较运算符

    Golang的运算符-比较运算符 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.比较运算符概述 比较运算符也称为关系运算符,比较运算符返回的类型为bool类型,常见的比较运算符 ...

  4. Exchange 2003 群集迁移 & SPS 2003 迁移、SQL Server 2000群集

    哈哈,本人自己写的文档,内容太多了,有195页,上传到Blog里面,应该是很难看的,排版也不太好. 记得下载时后改名字,用WinRAR解压合并. 第1章 迁移环境介绍 第2章 共享磁盘柜配置 第3章 ...

  5. Hash!

    Panda一个字符串是否是另一个字符串的子串 #include<bits/stdc++.h> using namespace std; const int mod=998244353,tt ...

  6. DRF项目之实现用户密码加密保存

    在DRF项目的开发中,我们通过直接使用序列化器保存的用户信息时,用户的密码是被明文保存到数据库中. 代码实现: def create(self, validated_data): '''重写creat ...

  7. TensorFlow2 Part2:基础知识回顾

    python面向对象编程回顾 基础概念: 面向对象的编程简称OOP,它把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 面向对象的设计思想是抽象出Class,根据Class(类)创建In ...

  8. webpack随笔2--编译ES6/ES7

    一.Babel 1.安装babel Bable-loader: babeljs.io babel最新版:npm install babel-loader@8.0.0-beta.0 @babel/cor ...

  9. springboot - 映射HTTP Response Status Codes 到 静态 HTML页面

    1.总览 2.代码 1).pom.xml <dependencies> <dependency> <groupId>org.springframework.boot ...

  10. springboot+thymeleaf项目中使用th:replace访问templates子目录下的模板,会报错找不到模板路径

    解决方法: 先将模板路径放置templates目录下,发现可以访问,说明th:replace是可以用的. 那可能是出现在路径问题上面. 于是我开始调错,改路径. 后来在网上查找资料.说了很多种方法. ...