File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Help: precompile jsp with jspc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Help: precompile jsp with jspc" Watch "Help: precompile jsp with jspc" New topic

Help: precompile jsp with jspc

Andy Zhu
Ranch Hand

Joined: May 26, 2004
Posts: 145
How can I precompile jsp with jspc? I am trying to write makefile with it. So no ant please. The question is if I just want to use jspc at command line to compile a jsp page, then how should I do it? (I always get an exception error, using jasper from tomcat 5.0.25)


--------<br />Andy Zhu<br />scjp 1.4<br />scjd 1.4<br />SAS Certified Programmer 9.0
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Moving to the JSP Forum.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Andy Zhu
Ranch Hand

Joined: May 26, 2004
Posts: 145
I am answering my own question and hopefully someone will find this useful. My usage of jspc is for gnu make (don't be away from it if you are win32 user, install mingw you will be able to use a lot of unix programs in win32 including gnu make). So I am a fan of make utility, not ant.

the most important thing is to provide class path to java when invoking org.apache.jasper.JspC: there are several ones in the $CATALINA_HOME/common/lib; however, one must include $CATALINA_HOME/bin/commons-logging-api.jar. This package has bothered me so long to get it. But now I am on the track.
I agree. Here's the link:
subject: Help: precompile jsp with jspc
It's not a secret anymore!