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. SQL创建表格——手写代码

    打开phpstudy,打开Navicat for MySQL,进入要创建表格的数据库,点击上方“查询”按钮,“创建查询”,即可输入代码进行创建. 例: create table class( clas ...

  2. JavaScript的调用

    1 方法调用模式 var myObject = { value : 0, increment : function(inc) { alert('hi'); } }; myObject.incremen ...

  3. 格雷码(Grey Code)生成规则

    (1) Grey码在FPGA实际应用中是实用的码,在8421BCD码累加计数器中,如果寄存器需要发生多位(两位或者以上)的跳变,会出现中间态,这样作为组合逻辑的输入是不稳妥的. 下面看两个中间态的例子 ...

  4. Linux服务器命令大全

    快捷提示键: table 查看文件夹:  ls , ls –all ,ls –l,ll 进入某个文件夹: cd usr/local 回到root 目录 : cd /root/ 回到根目录:cd / 回 ...

  5. sql server 2012插入排序后的数据到临时表无效

    IF OBJECT_ID('TEMPDB..#list') IS NOT NULLBEGIN DROP TABLE TEMPDB.#list END CREATE TABLE #list(OFC_ID ...

  6. R语言 线性回归分析实例 《回归分析与线性统计模型》page72

    y,X1,X2,X3 分别表示第 t 年各项税收收入(亿元),某国生产总值GDP(亿元),财政支出(亿元)和商品零售价格指数(%). (1) 建立线性模型: ① 自己编写函数: > librar ...

  7. jedis哨兵模式的redis组(集群),连接池实现。(客户端分片)

    java 连接redis 我们都使用的 是jedis  ,对于redis这种频繁请求的场景我们一般需要对其池化避免重复创建,即创建一个连接池 ,打开jedis的 jar包我们发现,jedis对池已经有 ...

  8. H5页面跳到安卓APP和iosAPP

    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { // window.webkit.messagehandlers是js的固定写法, ...

  9. word 2007 文档中添加文件

    1. "插入"->"对象",出现的下拉框中选择"对象" 2.弹出界面 3.切换至"由文件创建",点击"浏 ...

  10. 1.求子集,2.动态创建action

    功能待完善 #ifndef MYMAINWINDOW_H #define MYMAINWINDOW_H #include <QMainWindow> #include <QTable ...