on 05-02-2005 3:07 PM
Hello,
I'm trying to compile my jsp's at build time using Ant. I'm familiar with how to do this with both weblogic and websphere but I cannot find any information on how to do this with the SAP j2ee engine. I know there is a way to have the server compile pages at startup but I want to be able to simply supply an ear with all of the compiled jsp's.
Thanks,
Chris
I thought that jsp's needed to be compiled specifically for each app server. Will jsp's compiled with the apache/tomcat jasper41 compiler run properly in the SAP J2EE server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on Roger's reply, I ended up solving this issue.
It's important when using jasper to precompile your jsp's to put jasper-runtime.jar in your WEB-INF/lib directory.
in addition to the ant script he supplied, this other bit is helpful to automatically create the servlet entries for webxml and then insert them automatically
In the jspc ant task, add the property "webinc" and give it the name of the xml fragment file.
You need to have the text "@JSPC-INSERT-HERE@" in your base web.xml file...
<loadfile property="jspc.webxml.fragment.contents" srcFile="${xml.fragment}"/>
<copy file="$/web.xml" tofile="$/web.xml"/> <replace file="$/web.xml">
<replacefilter token="@JSPC-INSERT-HERE@" value="${jspc.webxml.fragment.contents}"/>
</replace>
Thanks for the helpful responses.
Chris
Try this -
<jspc srcdir="$/src/war" destdir="$/gensrc"
package="com.i3sp.jsp"
compiler="jasper41"
verbose="9">
<include name="*/.jsp"/>
</jspc>
or check out all the ant tasks @ http://ant.apache.org/manual/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply.
Unforunately, I will not be able to use NetWeaver to build the .ear file. I need to be able to build the .ear just using ant. Any other ideas?
Thanks
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
In NDS (NetWeaver Developer Studio) you can create JSPs within Web Modle Project and include it into Enterprise Application Project and select the application project and right click it and select Build Application Archive, which will generate .ear file which will compiles all the classes and select the ear file and deploy it into the WAS (Web Application Server).
Thanks
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.