You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shankar <as...@rediffmail.com> on 2002/12/07 12:48:10 UTC

jspc and webapp

Greetings!

Has any one tried jspc and webapp?  I want to precomile jsps and 
write the servlet-mapping into web.xml.  How can I use the above 
for this purpose.

I am working with ant1.5.1 and jboss+tomcat as my appserver.

Thanks in advance.






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jspc and webapp

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Shankar" <as...@rediffmail.com>
To: <an...@jakarta.apache.org>
Sent: Saturday, December 07, 2002 03:48
Subject: jspc and webapp


> Greetings!
>
> Has any one tried jspc and webapp?  I want to precomile jsps and
> write the servlet-mapping into web.xml.  How can I use the above
> for this purpose.
>
> I am working with ant1.5.1 and jboss+tomcat as my appserver.
>

<jspc> is troubled in ant1.5.x; it is slightly better in the version on
CVS_HEAD, with the webapp, webxml and webinc arguments all supported. If you
want to get into advanced jspc, you need to get on CVS and pick up a nightly
build


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jspc and webapp

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Martin" <mg...@hotmail.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, May 08, 2002 04:23
Subject: Re: jspc and webapp


> This is the FIRST example of using args and jvmargs I have seen
> Can we PLEASE include this in the Ant Documentation?

no, because
(a) we have such examples already, look in
http://ant.apache.org/manual/CoreTasks/java.html,
(b) you can use <sysproperty> rather than -Dsomething=value to set sys
properties; JVMargs is less important than you think.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jspc and webapp

Posted by Martin <mg...@hotmail.com>.
This is the FIRST example of using args and jvmargs I have seen
Can we PLEASE include this in the Ant Documentation?
Thank You,
-Martin

----- Original Message -----
From: "Jacob Kjome" <ho...@visi.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Saturday, December 07, 2002 11:09 AM
Subject: Re: jspc and webapp


>
> Here's something I copied from an ant-user message a while ago.  Haven't
> tried it, though.  Maybe it will help....
>
>
> <property name="build.compiler" value="jikes"/>
> <path id="compile.classpath">
>    <pathelement location="${java.home}/jre/lib/rt.jar"/>
>    <pathelement location="${java.home}/lib/tools.jar"/>
>    <pathelement location="${tomcat.lib}/jasper-compiler.jar"/>
>    <pathelement location="${tomcat.lib}/jasper-runtime.jar"/>
>    <pathelement location="${tomcat.common.lib}/xerces.jar"/>
>    <pathelement location="${tomcat.common.lib}/servlet.jar"/>
>    ...
> </path>
> <!-- store the generated java classes here -->
> <property name="generated.java.classes.dir" value="/some/path" />
> <!-- generate java classes for you JSPs and mapping web.xml -->
> <java
>   classname="org.apache.jasper.JspC"
>   classpath="${compile.classpath}"
>   fork="true"
>   failonerror="true">
>    <arg value="-d" />
>    <arg value="${generated.java.classes.dir}" />
>    <arg value="-webinc" />
>    <arg value="/path/to/the/generated/web.xml" />
>    <arg value="-webapp" />
>    <arg value="/path/to/you/webapp/dir" />
>    <jvmarg
>
value="-Djava.endorsed.dirs=${tomcat.home}/bin:${tomcat.home}/common/endorse
> d" />
>    <jvmarg value="-Djasper.home=${tomcat.home}" />
>    <jvmarg value="-Xms194m" />
>    <jvmarg value="-Xmx194m" />
> </java>
> <!-- compile generated java classes and store them in their finall
location
> -->
> <javac
>   srcdir="${generated.java.classes.dir}"
>   destdir="/path/to/you/webapp/dir/WEB-INF/classes"
>   optimize="off"
>   debug="on"
>   depend="on"
>   classpath="${compile.classpath}"
>   includeJavaRuntime="on"/>
>
>
> Jake
>
>
> At 11:48 AM 12/7/2002 +0000, you wrote:
> >Greetings!
> >
> >Has any one tried jspc and webapp?  I want to precomile jsps and write
the
> >servlet-mapping into web.xml.  How can I use the above for this purpose.
> >
> >I am working with ant1.5.1 and jboss+tomcat as my appserver.
> >
> >Thanks in advance.
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jspc and webapp

Posted by Jacob Kjome <ho...@visi.com>.
Here's something I copied from an ant-user message a while ago.  Haven't 
tried it, though.  Maybe it will help....


<property name="build.compiler" value="jikes"/>
<path id="compile.classpath">
   <pathelement location="${java.home}/jre/lib/rt.jar"/>
   <pathelement location="${java.home}/lib/tools.jar"/>
   <pathelement location="${tomcat.lib}/jasper-compiler.jar"/>
   <pathelement location="${tomcat.lib}/jasper-runtime.jar"/>
   <pathelement location="${tomcat.common.lib}/xerces.jar"/>
   <pathelement location="${tomcat.common.lib}/servlet.jar"/>
   ...
</path>
<!-- store the generated java classes here -->
<property name="generated.java.classes.dir" value="/some/path" />
<!-- generate java classes for you JSPs and mapping web.xml -->
<java
  classname="org.apache.jasper.JspC"
  classpath="${compile.classpath}"
  fork="true"
  failonerror="true">
   <arg value="-d" />
   <arg value="${generated.java.classes.dir}" />
   <arg value="-webinc" />
   <arg value="/path/to/the/generated/web.xml" />
   <arg value="-webapp" />
   <arg value="/path/to/you/webapp/dir" />
   <jvmarg
value="-Djava.endorsed.dirs=${tomcat.home}/bin:${tomcat.home}/common/endorse
d" />
   <jvmarg value="-Djasper.home=${tomcat.home}" />
   <jvmarg value="-Xms194m" />
   <jvmarg value="-Xmx194m" />
</java>
<!-- compile generated java classes and store them in their finall location
-->
<javac
  srcdir="${generated.java.classes.dir}"
  destdir="/path/to/you/webapp/dir/WEB-INF/classes"
  optimize="off"
  debug="on"
  depend="on"
  classpath="${compile.classpath}"
  includeJavaRuntime="on"/>


Jake


At 11:48 AM 12/7/2002 +0000, you wrote:
>Greetings!
>
>Has any one tried jspc and webapp?  I want to precomile jsps and write the 
>servlet-mapping into web.xml.  How can I use the above for this purpose.
>
>I am working with ant1.5.1 and jboss+tomcat as my appserver.
>
>Thanks in advance.
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>