Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you compile JSPs with JRE? 1

Status
Not open for further replies.

scrat

Programmer
Apr 12, 2002
52
0
0
US
Hi,

Having developed a struts application using Tomcat 4.1.24 and JDK 1.3.1_06, I tried mocking up the client's WIN2K machine environment with JRE 1.4.0. After getting past the bug in setclasspath.bat (deleting the tests for jdb and javac, which will not exist in the JRE), I find that the JSPs are not compiling. I can see in my logs that the struts action class is executing and trying to forward to the jsp, but I get the following:



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

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.



The %CATALINA_HOME%\work\Standalone\localhost\<my_app> directory has the jsp java file, but no jsp class file (which I do get in my dev environment).

I tried copying the compiled jsp classes into the above dir but it did not seem to help.

Even the tomcat index page does not compile.

Does anyone know of issues using the JRE, and any work arounds?

thanks,
scrat
 
Okay. So thinking this through for a second, obviuosly the JRE cannot compile JSPs because it hasn't got a compiler. So a more realistic question is, can you precompile jsps and deploy them in a war file?
 
Of course you can. There are pages and pages of documentation on how to build and deploy war files at both Apache.org and java.sun.com

-pete
 
Thanks for your suggestion. It turns out that the jre does not include tools.jar, which has the compile wherewithal. You live and learn. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top