You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joly M <jo...@gmail.com> on 2007/12/21 10:36:35 UTC

how to run a simple jsp file

Hello there,

I'm struggling on running JSP files.
I've got some JSP files containing Java codes. When I try to run those
files, I get an error number 500.
When I run JSP files not containing any Java code at all, Everything works.
It seems like the problem comes from Java files.

I know that I've got to configure some XML files (eg: web.xml) in order to
run any Servlet.
Is there any XML files I have to configure to run JSPs on Apache Tomcat 6 ?

Cheers

Re: how to run a simple jsp file

Posted by David Smith <dn...@cornell.edu>.
In my experience, there is almost always another error before this one 
where the jsp is compiled to a .java file before it's compiled to a 
.class file.  If what you posted is really the first error message 
related to the request: stop tomcat, empty tomcat's work directory, 
start tomcat, and try it again.  If it's still not working, post the 
very first error message related to the request.

--David

Joly M wrote:
> Hello David,
>
>
> I'm using
> -Windows XP
> -Tomcat 6.0
>
> I don't know what Java Version is installed on my computer as I'm currently
> at work, but I will let you know as soon as possible.
> Could  be the Java Version the trigger of the error ?
>
> There is the error message :
>
> Etat HTTP 500 -
>
> type Rapport d'exception (exception report)
>
> message
>
> description Le serveur a rencontré une erreur interne () qui l'a empêché de
> satisfaire la requête.
>
> exception
> org.apache.jasper.JasperException: org.apache.jasper.JasperException:
> Impossible de charger la classe pour la JSP (can't load the clall for the
> jsp)
> org.apache.jasper.servlet.JspServletWrapper.getServlet (
> JspServletWrapper.java:156)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :329)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> cause mère
> org.apache.jasper.JasperException: Impossible de charger la classe pour la
> JSP (can't load the clall for the jsp)
> org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:600)
> org.apache.jasper.servlet.JspServletWrapper.getServlet(
> JspServletWrapper.java:144)
> org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java
> :329)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java :803)
>
> cause mère
> java.lang.ClassNotFoundException: org.apache.jsp.date_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:598)
> org.apache.jasper.servlet.JspServletWrapper.getServlet(
> JspServletWrapper.java:144)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :329)
> org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
>
> Cheers,
>
> 2007/12/21, David Smith <dn...@cornell.edu>:
>   
>> Could you post the error in your logs corresponding to the 500 error?
>> Also would be helpful to know tomcat, os, and java versions.
>>
>> --David
>>
>> Joly M wrote:
>>     
>>> Hello there,
>>>
>>> I'm struggling on running JSP files.
>>> I've got some JSP files containing Java codes. When I try to run those
>>> files, I get an error number 500.
>>> When I run JSP files not containing any Java code at all, Everything
>>>       
>> works.
>>     
>>> It seems like the problem comes from Java files.
>>>
>>> I know that I've got to configure some XML files (eg: web.xml) in order
>>>       
>> to
>>     
>>> run any Servlet.
>>> Is there any XML files I have to configure to run JSPs on Apache Tomcat
>>>       
>> 6 ?
>>     
>>> Cheers
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: how to run a simple jsp file

Posted by Joly M <jo...@gmail.com>.
Hello David,


I'm using
-Windows XP
-Tomcat 6.0

I don't know what Java Version is installed on my computer as I'm currently
at work, but I will let you know as soon as possible.
Could  be the Java Version the trigger of the error ?

There is the error message :

Etat HTTP 500 -

type Rapport d'exception (exception report)

message

description Le serveur a rencontré une erreur interne () qui l'a empêché de
satisfaire la requête.

exception
org.apache.jasper.JasperException: org.apache.jasper.JasperException:
Impossible de charger la classe pour la JSP (can't load the clall for the
jsp)
org.apache.jasper.servlet.JspServletWrapper.getServlet (
JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

cause mère
org.apache.jasper.JasperException: Impossible de charger la classe pour la
JSP (can't load the clall for the jsp)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:600)
org.apache.jasper.servlet.JspServletWrapper.getServlet(
JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java
:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java :803)

cause mère
java.lang.ClassNotFoundException: org.apache.jsp.date_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:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(
JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



Cheers,

2007/12/21, David Smith <dn...@cornell.edu>:
>
> Could you post the error in your logs corresponding to the 500 error?
> Also would be helpful to know tomcat, os, and java versions.
>
> --David
>
> Joly M wrote:
> > Hello there,
> >
> > I'm struggling on running JSP files.
> > I've got some JSP files containing Java codes. When I try to run those
> > files, I get an error number 500.
> > When I run JSP files not containing any Java code at all, Everything
> works.
> > It seems like the problem comes from Java files.
> >
> > I know that I've got to configure some XML files (eg: web.xml) in order
> to
> > run any Servlet.
> > Is there any XML files I have to configure to run JSPs on Apache Tomcat
> 6 ?
> >
> > Cheers
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: how to run a simple jsp file

Posted by David Smith <dn...@cornell.edu>.
Could you post the error in your logs corresponding to the 500 error?  
Also would be helpful to know tomcat, os, and java versions.

--David

Joly M wrote:
> Hello there,
>
> I'm struggling on running JSP files.
> I've got some JSP files containing Java codes. When I try to run those
> files, I get an error number 500.
> When I run JSP files not containing any Java code at all, Everything works.
> It seems like the problem comes from Java files.
>
> I know that I've got to configure some XML files (eg: web.xml) in order to
> run any Servlet.
> Is there any XML files I have to configure to run JSPs on Apache Tomcat 6 ?
>
> Cheers
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: how to run a simple jsp file

Posted by Joly M <jo...@gmail.com>.
the log says it can't load the class for JSP

2007/12/21, Pid <p...@pidster.com>:
>
> Joly M wrote:
> > Hello there,
> >
> > I'm struggling on running JSP files.
> > I've got some JSP files containing Java codes. When I try to run those
> > files, I get an error number 500.
> > When I run JSP files not containing any Java code at all, Everything
> works.
> > It seems like the problem comes from Java files.
> >
> > I know that I've got to configure some XML files (eg: web.xml) in order
> to
> > run any Servlet.
> > Is there any XML files I have to configure to run JSPs on Apache Tomcat
> 6 ?
> >
> > Cheers
> >
>
> What do the logs say is causing the error?
>
>
>
> p
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: how to run a simple jsp file

Posted by Pid <p...@pidster.com>.
Joly M wrote:
> Hello there,
> 
> I'm struggling on running JSP files.
> I've got some JSP files containing Java codes. When I try to run those
> files, I get an error number 500.
> When I run JSP files not containing any Java code at all, Everything works.
> It seems like the problem comes from Java files.
> 
> I know that I've got to configure some XML files (eg: web.xml) in order to
> run any Servlet.
> Is there any XML files I have to configure to run JSPs on Apache Tomcat 6 ?
> 
> Cheers
> 

What do the logs say is causing the error?



p

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org