wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlets work - jsp's don't Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets work - jsp Watch "Servlets work - jsp New topic
Author

Servlets work - jsp's don't

Richard Elsberry
Ranch Hand

Joined: Mar 14, 2001
Posts: 40
When I try to run the sample jsp applications that come with tomcat I get a Servlet Exception which I have included below. The servlets run fine. I've noted that other posts are having problems with sun.tools.javac.Main by not including the <JAVA_HOME>/bin/tools.jar in the classpath. I have checked this. I am confused by the sun.tools.javac.Main deprecated message. Here is the exception output I get:
BEGIN MESSAGE
-----------------------------------------------------------------
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
nullC:\tomcat\work\localhost\examples\jsp\include\_0002fjsp_0002finclude_0002finclude_jsp.java:102: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception.
if (pageContext != null) pageContext.handlePageException(t);
^
1 error, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1000)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
at java.lang.Thread.run(Thread.java:539)
-----------------------------------------------------------------
END MESSAGE
Anybody else struggle with this?
Thanks!
Richard
Chidanand Jigajinni
Greenhorn

Joined: Nov 18, 2005
Posts: 1
Me too facing similar problems....

Any help pls.....

Chidanand
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Can you tell us what container you're using?
What JDK you're using?
What OS your running?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets work - jsp's don't
 
Similar Threads
Help wanted for first time JSP
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
Not a Frequent Exception
problem with tomcat4.0.4!!
The CATALINA_HOME enviornment variable