当前页面: 开发资料首页 → Eclipse 专题 → 求助:Ecliplse不能编译javabean文件。
求助:Ecliplse不能编译javabean文件。
摘要: 求助:Ecliplse不能编译javabean文件。
初学Eclipse,在写jsp+javabean的程序时,发现不能编译javabean文件,哪位知道是什么原因请告知。(已经在—项目选项中设置了自动编译)
有谁碰到这种问题了吗?
能帮帮我吗?
项目 右键 属性 构建路径 指定source目录
还是不行,莫不是我的Eclipse安装有问题?
装个tomcat插件,创建项目的时候选tomcat项目。编写的.java和.class文件会自动放入相对应的文件系统中
我已经装了lomboz和tomcat插件,如下操作:file->new->project->web->Dynamic Web project
新建Dynamic Web project后,其目录下有
/src
/webContent
/build 文件夹,我在/webContent新建jsp文件
在/src中新建javabean文件(已选自动编译),但调试时会有以下错误:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /listFile.jsp
Generated servlet error:
D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/jspStudy/org/apache/jsp/listFile_jsp.java:45: cannot find symbol
symbol : class Dir
location: class org.apache.jsp.listFile_jsp
Dir Dir = null;
^
An error occurred at line: 3 in the jsp file: /listFile.jsp
Generated servlet error:
D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/jspStudy/org/apache/jsp/listFile_jsp.java:47: cannot find symbol
symbol : class Dir
location: class org.apache.jsp.listFile_jsp
Dir = (Dir) _jspx_page_context.getAttribute("Dir", PageContext.PAGE_SCOPE);
^
An error occurred at line: 3 in the jsp file: /listFile.jsp
Generated servlet error:
D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/jspStudy/org/apache/jsp/listFile_jsp.java:49: cannot find symbol
symbol : class Dir
location: class org.apache.jsp.listFile_jsp
Dir = new Dir();
^
3 errors
自己弄了两天还没搞定,希望大伙帮忙啊!