超类“javax.servlet.http.HttpServlet”在Java构建路径中找不到 [英] The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

查看:4629
本文介绍了超类“javax.servlet.http.HttpServlet”在Java构建路径中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由Eclipse中的Maven集成创建的项目。所有工作都很好,但是在所有JSP文件的工作空间中都有这样的:

 超类javax.servlet.http.HttpServlet 在Java构建路径中找不到

到第一个字符串,其中的位置:

 <%@ page language =javacontentType =text / html; charset = UTF-8
pageEncoding =UTF -8\" %>

当我创建一个基本的动态Web项目和JSP时,一切都很好,没有错误。 p>

解决方案

首先添加运行库并选择项目属性。然后从Runtimes选项卡中查看服务器名称,如图所示。




I have a project created by Maven integration in Eclipse. All work fine, but in the work space in all JSP files have this:

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

To the first string where place:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

When I create a basic dynamic web project and JSP in - all is fine, no errors.

解决方案

Add a runtime first and select project properties. Then check the server name from the 'Runtimes' tab as shown in the image.

这篇关于超类“javax.servlet.http.HttpServlet”在Java构建路径中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆