当前位置: 技术问答>java相关
怎么在jsp中调用一般的class
来源: 互联网 发布时间:2015-02-14
本文导语: 然后用不用设置什么路径呢?或是把 .class 文件放在什么特定的文件夹下。 现在出现如下的错误信息: A Servlet Exception Has Occurred org.apache.jasper.JasperException: Unable to compile class for JSP..worklocalhostexamples_0002fjsp_00...
然后用不用设置什么路径呢?或是把 .class 文件放在什么特定的文件夹下。
现在出现如下的错误信息:
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP..worklocalhostexamples_0002fjsp_0002fmail_0002fmailviewer_0002ejspmailviewer_jsp_0.java:3: import 中未找到类 mailparser.Parser。
import mailparser.Parser;
^
1 个错误
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:464)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:435)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:156)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:168)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2038)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:811)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:890)
at java.lang.Thread.run(Thread.java:484)
望指教!
|
打包jar放在lib下
|
有parser扩展名的类吗?大概是:
mailparser包应该包含在classpath中
set classpath=.;c:/jdk1.3/lib;c:/mailparser
mailparser包应该包含在classpath中
set classpath=.;c:/jdk1.3/lib;c:/mailparser
|
http://www.csdn.net/expert/TopicView.asp?id=85391