Background
In WebSphere® Application Server V4.0, the JSP compiler removes the
static content from the generated .java file and places it in a *.dat
file. Binary *.dat files are created to store all of the static content
(such as, HTML and Javascript) that are not within JSP tags (such as,
<% .... %>, <jsp: ..... />, <%@ page .... %> and <%!
.... %>). This reduces the size of the service() method in the JSP.
In WebSphere Application Server V5.0 and V6.0 this static content is
not removed from the generated .java by default. A JSP attribute called,
largefile, needs to be set in order for the compiler to remove static
content from the resultant class to a .dat file. This attribute can be set
two ways, either by suing AAT/similar tool or editing ibm-web-ext.xmi
file.
Using Application Assembly Tool (AAT), WebSphere Studio
Application Developer, Application Server Toolkit (ASTK), or a similar
tool:
- Open the earfile with the tool
- Expand ear file -> expand web modules -> expand selected web
module
- Expand Assembly Property Extensions
- Select JSP Attributes and right click to add new attribute.
- Specify Name to be largefile and value to be true
- Save the changes to archive
- Redeploy modified EAR file
Editing ibm-web-ext.xmi file:
- Locate ibm-web-ext.xmi file in following directory structure for
Application Server 5.0
WAS_HOME\config\cells\<cell-name>\applications\<app-name>\deployments\<app-name>\<web-module>\WEB-INF
and following directory structure for WAS 6.0
WAS_HOME\profiles\<profile-name>\config\cells\<cell-name>l\applications\<app-name>\deployments\<app-name>\<web-module>\WEB-INF
- Edit ibm-web-ext.xml file to add following line before last
line.<jspAttributes xmi:id="JSPAttribute_1117479991684"
name="largefile" value="true"/>
- Save the file and restart your application in order to make this
changes in effect.
Note: Setting this JSP attribute reduces content written to the
.class file; however, the 64 KB limit still exists. You may need to take
other actions if your resultant .class file still exceeds 64 KB.
|