wood burning stoves*
The moose likes BEA/Weblogic and the fly likes weblogic JSP precompile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic JSP precompile" Watch "weblogic JSP precompile" New topic
Author

weblogic JSP precompile

nico soum
Greenhorn

Joined: Aug 02, 2001
Posts: 4
does anyone know how I can tell weblogic that I would like it to precompile my JSPs? Currently, users seem to take the hit of JSP compilation when a new version of the project is released. I am looking for a way to avoid this. I have found some material telling me to set this in web.xml but it seems that the project I am working on does not use such a file. I am new to weblogic and don't know what the options are for me.
Thanks,
Nico
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Use the WebLogic JSP compiler. The syntax is:
DOS>java weblogic.jspc -options filename
see http://edocs.bea.com/wls/docs60/jsp/reference.html
for details.
Tim Chen
Greenhorn

Joined: Aug 06, 2001
Posts: 2
Depends on what version of WebLogic you are using.
You can set it up in weblogic.xml for webLogic 6.0
<JSP-DESCRIPTOR>
<JSP-PARAM>precompile</JSP-PARAM>
<JSP-VALUE>TRUE</JSP-VALUE>
</JSP-DESCRIPTOR>
(WARNING: I got this from a Bea training class but I CANNOT find it documented on their e-docs. In fact the list of possible JSP-PARAM values does not even include the precompile option!!)
Or set up:
<context-param>
<param-name>weblogic.jsp.precompile</param-name>
<param-value>true</param-value>
</context-param>
In ur web.xml for that application.
If your project only has jsps.. u should still have those files but they might be empty.. if not.. just create them in the WEB-INF directory or ur project.
For more info look at: http://e-docs.bea.com/wls/docs60///////jsp/reference.html#57794
-Tim
Originally posted by nico soum:
does anyone know how I can tell weblogic that I would like it to precompile my JSPs? Currently, users seem to take the hit of JSP compilation when a new version of the project is released. I am looking for a way to avoid this. I have found some material telling me to set this in web.xml but it seems that the project I am working on does not use such a file. I am new to weblogic and don't know what the options are for me.
Thanks,
Nico


AOL IM sn: CrashedDrive
Harish SK
Greenhorn

Joined: Jun 01, 2001
Posts: 20
It never worked for me(never got the classes generated on startup), I use weblogic 6.1 SP4.
I have set the context-param described in BEA documentaion for 6.0.
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
I can't say that I've tried this myself in 6.1SP4, but the parameter described by Tim Chen is certainly present for version 6.1. It's in the jsp-descriptor element of the weblogic.xml deployment descriptor (which goes in the WEB-INF/ directory of your web app next to the standard J2EE web.xml DD). This should result in the JSPs being compiled when the web app is deployed.
Also, you should be able to precompile the JSPs before you deploy the app in WebLogic using the tool described by JiaPei Jen.
Either approach seems reasonable to me, but if you do it outside WebLogic then you can deploy the same precompiled app to multiple servers without having each server recompile the JSPs separately.


<a href="http://www.javaranch.com/bookpromo.jsp" target="_blank" rel="nofollow">WebLogic Book Giveaway</a> 2/25-2/27
Mary White
Ranch Hand

Joined: Jan 27, 2003
Posts: 41
I will go with Tim's solution, I was having the same problem and adding the weblogic.xml in my web-inf folder (at the same level of web.xml) worked.
Mary White
Ranch Hand

Joined: Jan 27, 2003
Posts: 41
You can see my thread at http://www.coderanch.com/t/66148/BEA-Weblogic/Precompile-JSP-Weblogic
 
Consider Paul's rocket mass heater.
 
subject: weblogic JSP precompile
 
Similar Threads
Precompiling jsp with weblogic
How to view servlet generated by tomcat when jsp is compiled
Precompiling JSP's in Resin
Deploying w/ Ant to Weblogic
weblogic.jspc thru command line(not thru ANT)