You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurent Michenaud <lm...@adeuza.fr> on 2001/12/04 18:28:10 UTC

jsp precompilation

Hi,

I'm searching a script ( bash-unix and/or bat-windows )
that would :
- generate java files from jsp
- compile generated java files
- compile servlet java files
- create the .war

It is no usefull that i do it if some of u has
already done it.

Michenaud Laurent
- Adeuza -
[ Développeur Web - Administrateur Réseau ]


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jsp precompilation

Posted by Denis Balazuc <de...@trader.com>.
You might want to look at a mixture between JSPC (Tomcat) and Ant....

>>I'm searching a script ( bash-unix and/or bat-windows )
You should then use Ant and create Ant tasks that you need (if you need to
write some...)


>>that would :

>>- generate java files from jsp
>> - compile generated java files
use JSPC (why not within Ant ? I don't remember if JSPC has a task on its
own but you can write one if it does not, or use a simple shell-command
task)

>> - compile servlet java files
Use Ant and the JDK you're working with....

>>- create the .war

Definitely, you should use Ant ;-)

http://jakarta.apache.org/ant

Cheers
Denis



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jsp precompilation

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Laurent Michenaud wrote:

> Hi,
> 
> I'm searching a script ( bash-unix and/or bat-windows )
> that would :
> - generate java files from jsp


In Tomcat's ./bin dir there is "jasper.sh", this is how you invoke it:

${CATALINA_HOME}/bin/jasper.sh jspc MyPage.jsp

This will produce MyPage.java


> - compile generated java files


javac -classpath ${CATALINA_HOME}/common/lib/servlet.jar MyPage.java


> - compile servlet java files


javac MyServlet.java


> - create the .war


mv MyPage.class ${MY_WEB_APP_HOME}/WEB-INF/classes/path/to/my/package/
jar cf MyWebApp.war ${MY_WEB_APP_HOME}

Or be advanced - make a build.xml for Ant and do it that way.




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>