HTTP Status 500 - Unable to compile class for JSP: 配置为:eclipse j2ee,tomcat8,
HTTPStatus500-UnabletocompileclassforJSP:typeExceptionreportmessageUnabletocompilecla...
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: [14] in the generated java file: [E:\bsoftinstall\tomcat_8_0_15\work\Catalina\localhost\project_jsp#WEB-INF\org\apache\jsp\index_jsp.java]
Only a type can be imported. com.baidu.TestHello resolves to a package
An error occurred at line: 13 in the jsp file: /index.jsp
TestHello cannot be resolved to a type
10: <body>
11:
12: <%
13: TestHello th = new TestHello();
14: System.out.println(th.testHello());
15: %>
16:
An error occurred at line: 13 in the jsp file: /index.jsp
TestHello cannot be resolved to a type
10: <body>
11:
12: <%
13: TestHello th = new TestHello();
14: System.out.println(th.testHello());
15: %>
16: 展开
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: [14] in the generated java file: [E:\bsoftinstall\tomcat_8_0_15\work\Catalina\localhost\project_jsp#WEB-INF\org\apache\jsp\index_jsp.java]
Only a type can be imported. com.baidu.TestHello resolves to a package
An error occurred at line: 13 in the jsp file: /index.jsp
TestHello cannot be resolved to a type
10: <body>
11:
12: <%
13: TestHello th = new TestHello();
14: System.out.println(th.testHello());
15: %>
16:
An error occurred at line: 13 in the jsp file: /index.jsp
TestHello cannot be resolved to a type
10: <body>
11:
12: <%
13: TestHello th = new TestHello();
14: System.out.println(th.testHello());
15: %>
16: 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询