aspose file tools*
The moose likes BEA/Weblogic and the fly likes How to precompile JSP on WebLogic6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "How to precompile JSP on WebLogic6.1" Watch "How to precompile JSP on WebLogic6.1" New topic
Author

How to precompile JSP on WebLogic6.1

Koji Yamamoto
Greenhorn

Joined: Nov 29, 2001
Posts: 4
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
Ranch Hand

Joined: Nov 15, 2001
Posts: 64
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)


Vijay shrivastava
Koji Yamamoto
Greenhorn

Joined: Nov 29, 2001
Posts: 4
Thank you very much for your reply.
I have tried following advice,
but compiling was failed.

Outputed err message is below.
--------------------------------------
<Dec 4, 2001 7:59:08 PM JST> <Error> <HTTP> <[WebAppServletContext(3394508,rads,/rads)] failure pre-compiling JSP's weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamException: Could not include ./include/skillheader.ihtml
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1017)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:78)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:181)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
:
:
stacktracing continued
--------------------------------------
Anyone know about this problem,
please tell me more advice.
bibek, agarwal
Greenhorn

Joined: Dec 05, 2001
Posts: 4
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.

keep the weblogic.jar file in the class path and then go to the command prompt in windows.go to the directory where alll the JSP are present and then type the following command.
java weblogic.jspc *.jsp
this will compile all the jsp and keep the class files there in the folder which you can use.
Koji Yamamoto
Greenhorn

Joined: Nov 29, 2001
Posts: 4
Sorry, I was not enough an expression until now.
I have to deploy 'war-file',
its JSP inculde other JSPs.
So I want to precompile its JSP.
Please give me a clue.
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to precompile JSP on WebLogic6.1