Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

weblogic JSP precompile

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic