Posted by WebSphere | Posted on 30-05-2011 | Posted in
Tagged Under : WebSphere, WebSphere Application Server
Keep the generated JSP Source file in WebSphere Application Server
We all know the location of generated Java source file from JSP in WebSphere Commerce. Suppose you are working in an WebSphere Application Server environment, not in WebSphere Commerce and you want to see the JSP source files generated by WAS. If you look in the temp directory of WebSphere, we can see only the .class files. Not the source file. WebSphere Application Server by default does not keep the generated Java source file. However we can instruct WebSphere to keep the generated Java source file in the temp directory. The location where WebSphere keeps the generated Java source file remains same. Of course you can change it, if you want to, by specifying some other configuration parameters.
To tell WebSphere to keep the generated Java source files from JSP, open your ibm-web-ext.xml file. The location of this file will be in WEB-INF directory. Add the following code.
<jsp-attribute name="keepgenerated" value="true" /> <jsp-attribute name="trackDependencies" value="true" />
This code should be the first lines in your ibm-web-ext.xml file. If you are getting any error after placing the above code, please check the location of the code you have placed.
Or you can even open the file in Design mode in Rational Application Developer and under Web extensions click on Add. From the pop up window select ‘JSP Attribute’. Enter keepgenerated or trackDependencies as the name of the attribute and true as the value.
Once you made the required changes, restart your RAD, server and try accessing the JSP page. Now if you look in the temp directory you will be able to see the generated java source file from JSP.