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

unable to compile class for JSP

Krishna Acharya
Ranch Hand

Joined: Jun 05, 2007
Posts: 34
Hi to All !!!
I am using tomcat 5.0 and jdk 1.4. tomcat is running properly. But whenever i try to run jsp page it gives the error like:

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

Generated servlet error:
[javac] javac: invalid flag: Files\Apache
[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

Please help me. I am in trouble. I am not able to go ahead due to this problem. Please............
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

javac: invalid flag: Files\Apache

A really wild guess - you have installed tomcat in a folder containing spaces in its path (maybe C:\Program Files\Apache). Install it in a folder which does not have a space in its path (Ex:C:\Apache\Tomcat)

[My Blog] [JavaRanch Journal]
I agree. Here's the link:
subject: unable to compile class for JSP
jQuery in Action, 3rd edition