also make sure the jsp file compiles ..you should see the java file show up in
%TOMCAT_HOME%\work\Catalina\localhost\webapp\org\apache\jsp\index_jsp.java

A crude way to precompile your jsp is to invoke the JspC class directly as in

java -cp %TOMCAT_HOME%\common\lib org.apache.jasper.JspC NameOfJsp.jsp

Maybe David or someone else can make a recommendation on alternative jasper 
compilers
(and of course make sure you have read permission to those files.)

HTH
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




> Date: Tue, 30 Dec 2008 20:39:58 -0500
> From: d...@cornell.edu
> To: users@tomcat.apache.org
> Subject: Re: java.lang.ClassNotFoundException with small jsp file
> 
> Is there any error messages before this in the logs that might offer any
> further insight?  When you say the class file exists, do you mean there
> is both hello_jsp.java and hello_jsp.class?  Or is the .class file
> missing.  Lastly, are you sure the user tomcat is running as has read
> privilege to the file?
> 
> --David
> 
> John Byrne wrote:
> > Hello all,
> >
> >  
> >
> > I was wondering whether any of you could help me out with a problem I'm
> > having.  I'm getting a java.lang.ClassNotFoundException when trying to run a
> > jsp application.  The class file exists and is under: 
> >
> > C:\Program Files (x86)\Apache Software Foundation\Tomcat
> > 6.0\work\Catalina\localhost\HelloWorld\org\apache\jsp
> >
> >  
> >
> > But it looks like Tomcat isn't finding it.  I'm getting other exceptions too
> > (all of them are below):
> >
> > org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable
> > to load class for JSP
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> > a:156)
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 29)
> >
> >  
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> >
> >         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> >
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >
> > root cause 
> >
> > org.apache.jasper.JasperException: Unable to load class for JSP
> >
> >  
> > org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> > a:144)
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 29)
> >
> >  
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> >
> >         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> >
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >
> > root cause 
> >
> > java.lang.ClassNotFoundException: org.apache.jsp.Hello_jsp
> >
> >         java.net.URLClassLoader$1.run(Unknown Source)
> >
> >         java.security.AccessController.doPrivileged(Native Method)
> >
> >         java.net.URLClassLoader.findClass(Unknown Source)
> >
> >  
> > org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
> >
> >  
> > org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
> >
> >  
> > org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> > a:144)
> >
> >  
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > 29)
> >
> >  
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> >
> >         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> >
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >
> >  
> >
> > When I installed tomcat I didn't set any CATALINA_HOME variable.  Was I
> > supposed to do this?
> >
> > I also can't find the log entries for this error.  I've looked under the
> > logs directory of the Tomcat installation but there are only logs from
> > previous days.
> >
> >  
> >
> > Thank you for all of your help.
> >
> >  
> >
> > John
> >
> >
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________
Send e-mail anywhere. No map, no compass.
http://windowslive.com/oneline/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_anywhere_122008

Reply via email to