You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Schalk Neethling <sc...@volume4.co.za> on 2004/08/12 14:56:42 UTC

RE: Servlet.service error

Hey there all!

I am running Tomcat 5.0.25 on Windows XP. I have set-up a .jsp in my 
web.xml so that I can all it as I do servlets:

<servlet>
      <servlet-name>footer</servlet-name>
    <jsp-file>/secure/includes/footer.jsp</jsp-file>
</servlet>
<servlet-mapping>
      <servlet-name>footer</servlet-name>
      <url-pattern>*.footer</url-pattern>
</servlet-mapping>

When I call a page that includes this .jsp as follows:
<jsp:include page="process.footer" flush="true" />

I get the following error in the Tomcat log:
2004-08-12 14:43:41 ApplicationDispatcher[/lawillustrated] 
Servlet.service() for servlet footer threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar 
from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat 
restart.
If using an alternate Java compiler, please check its installation and 
access path.

I did copy the tools.jar from my Java sdk to common/lib and also have 
set my Environment Variables to my JAVA_HOME/lib/ for both user and 
system. Restarted my system as well as Tomcat. Still get exactly the 
same result. All other .jsp's that are not mapped in the web.xml work 
fine without any errors. Any idea as to what is going wrong? Thanks!

-- 
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:schalk@volume4.co.za
web: www.volume4.co.za
 
This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Servlet.service error

Posted by Schalk Neethling <sc...@volume4.co.za>.
Hey all!

Does anyone have a suggestion here, or I am missing something simple?

Schalk Neethling wrote:

> Hey there all!
>
> I am running Tomcat 5.0.25 on Windows XP. I have set-up a .jsp in my 
> web.xml so that I can all it as I do servlets:
>
> <servlet>
>      <servlet-name>footer</servlet-name>
>    <jsp-file>/secure/includes/footer.jsp</jsp-file>
> </servlet>
> <servlet-mapping>
>      <servlet-name>footer</servlet-name>
>      <url-pattern>*.footer</url-pattern>
> </servlet-mapping>
>
> When I call a page that includes this .jsp as follows:
> <jsp:include page="process.footer" flush="true" />
>
> I get the following error in the Tomcat log:
> 2004-08-12 14:43:41 ApplicationDispatcher[/lawillustrated] 
> Servlet.service() for servlet footer threw exception
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> No Java compiler was found to compile the generated source for the JSP.
> This can usually be solved by copying manually 
> $JAVA_HOME/lib/tools.jar from the JDK
> to the common/lib directory of the Tomcat server, followed by a Tomcat 
> restart.
> If using an alternate Java compiler, please check its installation and 
> access path.
>
> I did copy the tools.jar from my Java sdk to common/lib and also have 
> set my Environment Variables to my JAVA_HOME/lib/ for both user and 
> system. Restarted my system as well as Tomcat. Still get exactly the 
> same result. All other .jsp's that are not mapped in the web.xml work 
> fine without any errors. Any idea as to what is going wrong? Thanks!
>

-- 
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:schalk@volume4.co.za
web: www.volume4.co.za
 
This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Servlet.service error

Posted by Schalk Neethling <sc...@volume4.co.za>.
Ok, here is something new. Usually I would just create my includes as a 
standard page and included it into other pages without any problems. 
Now, after I stripped out all the usual html stuff and just left the 
code that was needed to form the page, in this case a single table, the 
include is working. As soon as I replace the other html elements it 
stops to work and I get the original error in the log.

Could this be because I am coding in XHTML and the head element is 
causing a conflict?
i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Schalk Neethling wrote:

> Hey there all!
>
> I am running Tomcat 5.0.25 on Windows XP. I have set-up a .jsp in my 
> web.xml so that I can all it as I do servlets:
>
> <servlet>
>      <servlet-name>footer</servlet-name>
>    <jsp-file>/secure/includes/footer.jsp</jsp-file>
> </servlet>
> <servlet-mapping>
>      <servlet-name>footer</servlet-name>
>      <url-pattern>*.footer</url-pattern>
> </servlet-mapping>
>
> When I call a page that includes this .jsp as follows:
> <jsp:include page="process.footer" flush="true" />
>
> I get the following error in the Tomcat log:
> 2004-08-12 14:43:41 ApplicationDispatcher[/lawillustrated] 
> Servlet.service() for servlet footer threw exception
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> No Java compiler was found to compile the generated source for the JSP.
> This can usually be solved by copying manually 
> $JAVA_HOME/lib/tools.jar from the JDK
> to the common/lib directory of the Tomcat server, followed by a Tomcat 
> restart.
> If using an alternate Java compiler, please check its installation and 
> access path.
>
> I did copy the tools.jar from my Java sdk to common/lib and also have 
> set my Environment Variables to my JAVA_HOME/lib/ for both user and 
> system. Restarted my system as well as Tomcat. Still get exactly the 
> same result. All other .jsp's that are not mapped in the web.xml work 
> fine without any errors. Any idea as to what is going wrong? Thanks!
>

-- 
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:schalk@volume4.co.za
web: www.volume4.co.za
 
This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Servlet.service error

Posted by Mark Thomas <ma...@apache.org>.
This works for me in both TC4 and TC5 on Win XP. I suggest you try an as simple
as possible stand alone webapp and see if you can reproduce this. Also what
happens if you request footer.jsp directly?

Mark

> -----Original Message-----
> From: Schalk Neethling [mailto:schalk@volume4.co.za] 
> Sent: Thursday, August 12, 2004 1:57 PM
> To: Tomcat Users List
> Subject: RE: Servlet.service error
> 
> Hey there all!
> 
> I am running Tomcat 5.0.25 on Windows XP. I have set-up a .jsp in my 
> web.xml so that I can all it as I do servlets:
> 
> <servlet>
>       <servlet-name>footer</servlet-name>
>     <jsp-file>/secure/includes/footer.jsp</jsp-file>
> </servlet>
> <servlet-mapping>
>       <servlet-name>footer</servlet-name>
>       <url-pattern>*.footer</url-pattern>
> </servlet-mapping>
> 
> When I call a page that includes this .jsp as follows:
> <jsp:include page="process.footer" flush="true" />
> 
> I get the following error in the Tomcat log:
> 2004-08-12 14:43:41 ApplicationDispatcher[/lawillustrated] 
> Servlet.service() for servlet footer threw exception
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> No Java compiler was found to compile the generated source 
> for the JSP.
> This can usually be solved by copying manually 
> $JAVA_HOME/lib/tools.jar 
> from the JDK
> to the common/lib directory of the Tomcat server, followed by 
> a Tomcat 
> restart.
> If using an alternate Java compiler, please check its 
> installation and 
> access path.
> 
> I did copy the tools.jar from my Java sdk to common/lib and also have 
> set my Environment Variables to my JAVA_HOME/lib/ for both user and 
> system. Restarted my system as well as Tomcat. Still get exactly the 
> same result. All other .jsp's that are not mapped in the web.xml work 
> fine without any errors. Any idea as to what is going wrong? Thanks!
> 
> -- 
> Kind Regards
> Schalk Neethling
> Web Developer.Designer.Programmer.President
> Volume4.Development.Multimedia.Branding
> emotionalize.conceptualize.visualize.realize
> Tel: +27125468436
> Fax: +27125468436
> email:schalk@volume4.co.za
> web: www.volume4.co.za
>  
> This message contains information that is considered to be 
> sensitive or confidential and may not be forwarded or 
> disclosed to any other party without the permission of the 
> sender. If you received this message in error, please notify 
> me immediately so that I can correct and delete the original 
> email. Thank you.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org