回 帖 发 新 帖 刷新版面

主题:各位前辈好,一个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: 3 in the jsp file: /login.jsp

Generated servlet error:
    [javac] Compiling 1 source file

C:\Tomcat4.1\work\Standalone\localhost\_\login_jsp.java:63: cannot resolve symbol
symbol  : variable LoginBean
location: class org.apache.jsp.login_jsp
ResultSet rs=LoginBean.executeQuery(sql);
             ^



An error occurred at line: 3 in the jsp file: /login.jsp

Generated servlet error:
Note: C:\Tomcat4.1\work\Standalone\localhost\_\login_jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
1 error

我把写好的jsp文件放在C:\Tomcat4.1\webapps\ROOT下面,连接数据库用的javabean  Opendb放在C:\Tomcat4.1\webapps\ROOT\WEB-INF\classes\Opendb\下面。

回复列表 (共4个回复)

沙发

org.apache.jasper.JasperException: Unable to compile class for JSP

这说明你的JSP 没被编译成SERVLET

板凳

是啊,但是我不知道错在哪里了?是代码写的有问题还是因为环境设置有问题?

3 楼

cannot resolve symbol
symbol
一般是你的变量名字出错,也就是你写错了某个词,找找吧

4 楼

感谢

我来回复

您尚未登录,请登录后再回复。点此登录或注册