javax.servlet.jsp cannot be resolved to a type

把MyEclipse里的项目导入到Eclipse Luna版中后出现了个莫名其妙的错误,注:Eclipse Luna是新装的。

错误描述:jsp页面中引用的js报错,鼠标放上去以后提示:javax.servlet.jsp cannot be resolved to a type。图片为证:

类似以上底下有红色波浪线的错误,好多jsp页面都有,还各不相同。

解决办法:

点击菜单栏:Window→Preferences→Validation,在右侧找“JSP Syntax Validator”项,将该项后面的√去掉。点击OK,搞定!!

----------------------------------------------------------------------------------------------------------------------------------------------

javax.servlet.jsp cannot be resolved to a type,布布扣,bubuko.com

时间: 2024-08-02 22:56:52

javax.servlet.jsp cannot be resolved to a type的相关文章

javax.servlet.jsp cannot be resolved to a type,javax.servlet

可能是jdk 里不包括servlet-api.jar这个包,到tomcat里找到这个包复制到java项目里. 项目名-->右键 Property-->选择 Java Build Path-->选择 Add External JARs-->选择 把servlet-api.jar的路径输入即可 该包在tomcat里有 搜索即课找到 javaxservletjspJspException cannot be resolved to a type javaxservletjspPageCo

Eclipse------导入项目后出现javax.servlet.jsp cannot be resolved to a type

报错信息:javax.servlet.jsp cannot be resolved to a type 原因1: 这个错误可能是服务器自带的servlet库未导入的原因. 解决方法: 右键项目"Properties",转到Targeted Runtimes,选择一个服务器,例如Tomcat,单击应用,可能就可以解决. 原因2: servlet包只是编译时需要,而发布时不需要,避免与tomcat中的servlet包发生冲突 解决方法: 在pom.xml中添加对servlet-api的依赖

1,eclipse导入项目jdk版本不一样解决方案 2,java报javax.servlet.jsp cannot be resolved to a type

一:eclipse导入项目jdk版本不一样解决方案 参考博文: https://www.cnblogs.com/chenmingjun/p/8472885.html 选中项目右键 --> Properties --> Build Path --> 选中Libraries一栏,移除(Remove)这个库选项, 然后添加新的库选项: Add Library... --> JRE System Library --> next --> Execution environmen

maven中解决Type javax.servlet.jsp cannot be resolved to a type

解决方案: 在Maven的pom文件中引发如下依赖jar: <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.2.1-b03</version> </dependency> <dependency> <groupId>javax.servlet<

使用EL表达式正确情况下报错:javax.servlet.jsp cannot be resolved to a type

这个错误可能是服务器自带的servlet库未导入的原因.右键项目属性,转到Targeted Runtimes,选择一个服务器,例如Tomcat,单击应用,可能就可以解决.

使用Maven创建Web项目后,jsp引入静态文件提示报错。JSP 报错:javax.servlet.ServletException cannot be resolved to a type

使用Maven创建Web项目后,jsp引入静态文件提示报错. 错误提示:javax.servlet.ServletException cannot be resolved to a type 错误如下图: 解决方案: 在Maven的pom文件中引发如下依赖即可: <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <versio

javax.servlet.ServletException cannot be resolved to a type错误解决方法

在页面中使用全局路径时${pageContext.request.contextPath}出现javax.servlet.ServletException cannot be resolved to a type错误,解决方法如下: 这个错误主要是因为缺少jsp-api.jar 和  servlet-api.jar这两个Jar包. 第一种解决方法: 直接把 Tomcat7.0 下lib目录中的 jsp-api.jar 添加  Build path 中. 第二种解决方法:使用 Maven 将 js

maven中解决javax.servlet.jsp.PageContext cannot be resolved to a type

在eclipse环境下用maven出现:javax.servlet.jsp.PageContext cannot be resolved to a type. 这是因为没有引入jsp-api引发的问题,在pom.xml引入: <dependency> <span style="white-space:pre"> </span><groupId>javax.servlet</groupId> <artifactId>

- The import javax.servlet.jsp.JspWriter cannot be resolved

 Add servlet-api.jar and jsp-api.jar from Tomcat 6.0 library to ecipse project.- The import javax.servlet.jsp.JspWriter cannot be resolved