This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Error" Watch "JSP Error" New topic

JSP Error

Lavi Tang

Joined: Jul 15, 2006
Posts: 5
Hi all

I am getting an error while compiling JSP programs can anybody helpmein finding out why this error is occuring,what may be the problem??
Is it because of any path settings ??

The error is as follows:

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
[javac] javac: invalid flag: 5.0\common\endorsed
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compiler is doing
[javac] -deprecation Output source locations where deprecated APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source files
[javac] -bootclasspath <path> Override location of bootstrap class files
[javac] -extdirs <dirs> Override location of installed extensions
[javac] -d <directory> Specify where to place generated class files
[javac] -encoding <encoding> Specify character encoding used by source files
[javac] -source <release> Provide source compatibility with specified release
[javac] -target <release> Generate class files for specific VM version
[javac] -help Print a synopsis of standard options


This is the actual error which I got,Please help me!

Waiting for reply,

Thanks and regards
Jacob Fenwick
Ranch Hand

Joined: Apr 28, 2006
Posts: 55
How are you compiling it?
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

[javac] javac: invalid flag: 5.0\common\endorsed

Just a wild guess - are you using Tomcat? I guess your Tomcat folder is named "Tomcat 5.0"(Note the space between the letters). That *might* be the reason why you are seeing this error. Try renaming the tomcat folder to something like Tomcat5.0 (i.e. remove the space).

[My Blog] [JavaRanch Journal]
Lavi Tang

Joined: Jul 15, 2006
Posts: 5
Ya you are right! I use Tomcat and even the folder name is just as you said,but that worked properly in a system where I worked previously,I newly installed Tomcat 5.0.30 which is asking for the user name and password when I login , could this be the problem ? Maybe the site where I downloaded the Tomcat is not liscensed ! Or can you specify me the link for the download?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Tomcat is open source.
It needs no license.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: JSP Error
It's not a secret anymore!