File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Compile Error! help!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Compile Error! help!!!" Watch "Compile Error! help!!!" New topic

Compile Error! help!!!

he fei

Joined: Jun 24, 2004
Posts: 2
The Tomcat version is Tomcat5.0. OS:Windows.
It is always show this error,When I try to comple the *.jsp file even if I have copied manually $JAVA_HOME/lib/tools.jar from the JDK to the ommon/lib directory of the Tomcat server, followed by a Tomcat restart.
Who can help me?
Thank you!
HTTP Status 500 -


type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.


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.


note The full stack trace of the root cause is available in the Tomcat logs.


Apache Tomcat/5.0.9
[ June 24, 2004: Message edited by: he fei ]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Can you see the normal Tomcat startup page?
When I try to comple the *.jsp file

Exactly how are you trying to compile the *.jsp file?
David Wilson

Joined: May 07, 2004
Posts: 6
How about the examples that come with Tomcat? If those don't work then you're stuff will not work either.

What is you deployment like? Are you deploying your files in a war? What is your file structure?

he fei

Joined: Jun 24, 2004
Posts: 2
I can see the normal Tomcat startup page.
The examples that come with Tomcat could run well.
Some of my *.jsp files could run well,just a little.
I compiled the *.jsp file in Internet Explorer.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Ah, well that's your problem. Internet Explorer is not a compiler

You mean that you just called the JSP from your browser, without pre-compiling right?

So some JSP's compiled and produced output, but others do not? Are you using the pre-compiled JSP's in the example app, and then placing your own JSPs in this app? (That will not work)
I agree. Here's the link:
subject: Compile Error! help!!!
It's not a secret anymore!