Problem
I have some web applications running on WebSphere Application Server 8.5 ND. Sometimes after deployments, I faced the issue that changes made by developers in JSPs are not reflected. And this problem is happening only in the cases where a JSP is included in another JSP. For example, if a JSP named header.jsp included in the home.jsp and developers made some changes in the header.jsp file, after deploying the header.jsp on the server changes are not reflecting in the home.jsp.
<%@ include file="/jsp/header.jsp" %>
Reason
As home.jsp has static include <%@ include file=”/jsp/header.jsp” %>, if we made any change in the file header.jsp then WebSphere Application Server 8.5 ND would not be aware that home.jsp has been changed and this will not be recompiled by the server. If home.jsp will not be compiled then the server will use the old compiled class and change will not be reflected.
Solution
We have to do the following to resolve the above problem either we delete the existing class file corresponding to home.jsp or compile home.jsp to update the existing class file. We can follow any process from these:
- Make any change in the file home.jsp like, insert any blank space or new line to update the timestamp of the file. It will force the WebSphere Application Server to recompile the home.jsp.
- Clear the WebSphere Application Server java server pages compiled cache. It will force the Websphere Application Server to re-compile all java server pages when they will be accessed.
- The cache folder location is <profile-root>/tmp.
- Class file of java server page home.jsp is available at <cell-root>/AppServer/profiles/<profile-name>/temp/<node-name>/<server-name>/<application-name>/<warfile-name>/jsp/_home.class
- Set the custom property com.ibm.websphere.deletejspclasses to true in WebSphere Application Server. After setting this value to true, if JSP has the static include %@ include file="xxx" %, when the included child JSP has an update, then the old class file will be deleted and recompiled.
Last Updated: September 05, 2020
Related Posts:
- How to Verify the List of SSL /TLS Ciphers Used by WebSphere Application Server (WAS) SSL/TLS Config
- WebSphere Application Server DMGR console is not accessible
- Install WebSphere Application Server V8.5.5 Fix Pack 12 on HP-UX 11.31
- How to find JAVA version used by WebSphere Application Server (WAS)
- How to find version of an installed IBM WebSphere Application Server
- EAR restarting while updating a .jsp file through DMGR console
- How to Check JAVA SDK installed on WAS 8.5.5.x and running JAVA SDK?