![]() |
#2
bigpeach2010-02-12 09:01
异常信息如下:
异常信息如下: HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message 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: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 42 in the jsp file: /admin/InfoComm.jsp User cannot be resolved to a type 39: public String getName(String Userid)throws Exception 40: { 41: try{ 42: User o_user = new User(); 43: o_user.setUserId(Userid); 44: if(o_user.getUser()) 45: { An error occurred at line: 30 in the jsp file: /left.jsp Categories cannot be resolved to a type 27: //如果是管理员,则可以设置用户信息,如果是其他用户则可以更改自己的密码 28: // 定义用户对象 29: Vector v_Cate = new Vector(); 30: Categories o_Cate = new Categories(); 31: v_Cate = o_Cate.getMoreCategories(); 32: for(int i=0;i <v_Cate.size();i++) 33: { An error occurred at line: 30 in the jsp file: /left.jsp Categories cannot be resolved to a type 27: //如果是管理员,则可以设置用户信息,如果是其他用户则可以更改自己的密码 28: // 定义用户对象 29: Vector v_Cate = new Vector(); 30: Categories o_Cate = new Categories(); 31: v_Cate = o_Cate.getMoreCategories(); 32: for(int i=0;i <v_Cate.size();i++) 33: { An error occurred at line: 34 in the jsp file: /left.jsp Categories cannot be resolved to a type 31: v_Cate = o_Cate.getMoreCategories(); 32: for(int i=0;i <v_Cate.size();i++) 33: { 34: o_Cate = (Categories)v_Cate.elementAt(i); 35: %> 36: <tr> <td align="center"> <a href="infoList.jsp?cid= <%=o_Cate.getCateId()%>" target="main" style="text-decoration: none"> <%=o_Cate.getCateTitle()%> </a> </td> </tr> 37: <% }%> Stacktrace: org.apache.(DefaultErrorHandler.java:93) org.apache.(ErrorDispatcher.java:330) org.apache.(JDTCompiler.java:451) org.apache.(Compiler.java:319) org.apache.(Compiler.java:298) org.apache.(Compiler.java:286) org.apache.jasper.(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.28 logs. -------------------------------------------------------------------------------- Apache Tomcat/5.5.28 |
自定义的两个java包互相不能访问,甚至同一个包中的java文件相互之间也不能调用。
请问是 什么问题,应该怎么解决?
我的环境变量:
classpath :.;D:\Java\jdk1.6.0_18\lib\tools.jar;D:\Java\jdk1.6.0_18\lib\dt.jar
JAVA_HOME : D:\Java\jdk1.6.0_18
Path : D:\Java\jdk1.6.0_18\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
然后我定义的两个包的路径是:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\myapp\WEB-INF\classes
的下面,一个是 comm 文件夹,一个是 Information 文件夹。
但是 当浏览器的地址栏输入 http://localhost:9090/myapp/index.jsp 时,就说找不到
Information 和 comm 中的 类 。
请问这到底怎么解决呢?????