aspose file tools*
The moose likes Tomcat and the fly likes Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error" Watch "Error" New topic
Author

Error

Moses Herrada
Greenhorn

Joined: Jan 22, 2005
Posts: 11
Hi guys , i wrote a jsp and when i run on tomcat , it gives me a 500 error :

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.

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Do i need write my xml or anything?
thx
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Did you read the errormessage?
It contains instructions to implement a likely cure for the error.


42
Moses Herrada
Greenhorn

Joined: Jan 22, 2005
Posts: 11
but i still dont understand wheres the error?
help somebody?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

First: this is a Tomcat question. Ask in the Tomcat forum and you will get more enthusiastic help.
Second: Make sure to give them as much information as possible.
- What version of Tomcat are you running?
- What JDK are you using?
- What OS are you running on?
- If Windows, did you install it as a service and are you running that way?

I've seen this happen when the windows installer for Tomcat finds the wrong Java installation. Unistalling and then reinstalling fixes the problem.
I've also heard that having the JAVA_HOME environment variable set before running the Tomcat install helps but, having never looked at the code or tried it, I can't say for sure if it's true. Can't hurt though.
[ February 06, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
Also, if you're running Tomcat using a JRE (doesn't have the compiler in it) as opposed to a JDK, you can have this problem.


James Carman, President<br />Carman Consulting, Inc.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Moving to the Apache Tomcat forum...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error