This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to precompile JSP on WebLogic6.1

 
Koji Yamamoto
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Koji Yamamoto
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic