码迷,mamicode.com
首页 > 编程语言 > 详细

jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

时间:2015-08-31 16:49:42      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:

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: 11 in the jsp file: /index.jsp
User cannot be resolved to a type
8: <title>Insert title here</title>
9: </head>
10: <body>
11: <jsp:useBean id="user" class="User"></jsp:useBean>


解决办法:
新建class的时候不选择默认的包,而是自己建立一个包
<jsp:useBean id="user" class="demo.User"></jsp:useBean>

jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

标签:

原文地址:http://www.cnblogs.com/zzlp/p/4773102.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!