For Precompiling JSp's using the WLS6.1
1.
You should have the web.xml file in the web application Web-INF directory. This file contains the stuff which is global( not weblogic specific).
2. You should have the weblogic.xml file in the application Web-INF directory. It will contain all the instructions very specific to WebLogic and JSP precompilation is one of them.
add stuff similar to this...
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 6.0//EN" "http://www.bea.com/servers/wls610/dtd/weblogic-web-jar.dtd">
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>
pageCheckSeconds
</param-name>
<param-value>
1
</param-value>
</jsp-param>
<jsp-param>
<param-name>
verbose
</param-name>
<param-value>
true
</param-value>
</jsp-param>
<jsp-param>
<param-name>
compileCommand
</param-name>
<param-value>
/usr/j2se/bin/javac
</param-value>
</jsp-param>
<jsp-param>
<param-name>
precompile
</param-name>
<param-value>
true
</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app>
The important point is the sample file which comes with weblogic download will not work because you should have following line in web.xml
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
instead
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_1_2.dtd">
The difference is between 1.2 and 2.2
Also weblogic.xml which comes with sample may not work.
Hope it helps,
Originally posted by Koji Yamamoto:
Hello EveryBody!!
I'm trying to precompile JSP on WebLogic Server 6.1.
I already checked BEA's document, it indicate to edit 'jsp-descriptor' of 'web.xml', but 'jsp-descriptor' is in 'weblogic.xml'.
I have no idea what to do.
Please give me a sample xml or instructions.
Thanks for Reading.
------------------
Vijay shrivastava
Consultant - ObjectNetTechnologies ,Atlanta USA.
SCJP2, WLS5.1,SCJEA (Part I)