Friday, October 24, 2008

JSP KeepGenerated in Weblogic 9 and 10

By default Weblogic deletes the java files generated during the transation phase of a jsp. It just retains the .class files. These java files are sometimes very useful in debugging a jsp.

It can be achieved by modifying the weblogic.xml in the following way :

<jsp-descriptor>
<precompile>false</precompile>
<precompile-continue>false</precompile-continue>
<keepgenerated>true</keepgenerated>
<verbose>true</verbose>
<working-dir>c:/temp/bea</working-dir>
</jsp-descriptor>

If this does not work, then login to Weblogic Admin Console. Go to Deployments. Select your application. If it is an enterprise application you may have to choose the sub-module. Go to Configuration. Apply Lock and Edit. Check the Keepgenerated flag and save the changes.

You may have to restart the server !!!

4 comments:

Paul said...

keepgenerated
true


workingDir
c:\temp\bea

Paul said...


<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>

     <jsp-descriptor>

       <jsp-param>

         <param-name>keepgenerated</param-name>

         <param-value>true</param-value>

       </jsp-param>

       <jsp-param>

         <param-name>workingDir</param-name>

         <param-value>c:\temp\bea</param-value>

       </jsp-param>

     </jsp-descriptor>

</weblogic-web-app>

Rupal said...

I tried this, did't work for me.

Pierluigi Vernetto said...

thanks a lot for the tip, it worked for me, but additionally I had also to delete the server's tmp directory. This is something I have learned deploying stuff to WebLogic: always delete the tmp folder otherwise it will not regenerate the code.