我在Windows 7 64位上使用Eclipse Kepler和Tomcat 7。
如果我清理项目并重新启动服务器,一切都很好。但如果我工作几分钟......就像编辑一个jsp ...... Tomcat会对以下内容进行调整......
它抱怨丢失的标签是页面布局的标签。没有其他令人兴奋的东西,除了它有一些jspf包括和内容页面也称为其他标签。但同样,没有什么令人兴奋的......
我没有看到我是如何导致这一点的,因为事情编译并且最初运行良好。但是Tomcat似乎忘记了标记类。
如果我清理项目,它会恢复工作一段时间......
有什么想法吗? 感谢
HTTP Status 500 - Unable to compile class for JSP:
type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30:
31:
32:
33: <tags:layout-main>
34: <jsp:attribute name="title">page</jsp:attribute>
35: <jsp:attribute name="section">user</jsp:attribute>
36: <jsp:attribute name="handle">page</jsp:attribute>
An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30:
31:
32:
33: <tags:layout-main>
34: <jsp:attribute name="title">page</jsp:attribute>
35: <jsp:attribute name="section">user</jsp:attribute>
36: <jsp:attribute name="handle">page</jsp:attribute>
An error occurred at line: 106 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.webrating_tag cannot be resolved to a type
103: <div class="page clearfix">
104: <div class="title">
105: <h3>${page.name}</h3>
106: <br><tags:rating value="${3}"/>
107: <br>${page.type}
108: </div>
109: <div class="hours">
答案 0 :(得分:0)
尝试以下任何一项,它应该可行
复制WEB-INF/lib/
目录中的jar,然后重新启动Web容器
尝试
<%@ page language="java" import="Pkgname.className.*" %>
例如
<%@ page language="java" import="org.apache.jsp.tag.webrating" %>