How to enable automatic JSP reloading of Portal pages?


To view changes to your theme and skins JSP's without restarting the portal server, you can force the application server to automatically check for new versions of JSP's. While this is ideal for development and testing purposes, automatic JSP reloading should be disabled in a production environment because of performance issues.

Follow these steps to enable automatic JSP reloading:

Portal 6.x and below

1. Open the file was_profile_root/config/cells/cell_name/applications/wps.ear/deployments/wps/wps.war/WEB-INF/ibm-web-ext.xmi

Find the following entry in this file: 3. <webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="" xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmlns:commonext="commonext.xmi" xmlns:common="common.xmi" xmi:id="IBM_WPS_Ext" reloadInterval="3" reloadingEnabled="false"  fileServingEnabled="true" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="false" preCompileJSPs="false">

2. Change the value for reloadingEnabled to true.
3. Save the file.
4. Restart the portal server.

After completing these steps, JSPs are automatically reloaded when they are changed. However, to view changes to a JSP that is included by another (parent) JSP, you must also change the parent JSP to indicate that it must be reloaded by the server.

Portal 7 & 8

To enable reload of the static resources, make the change to the Default.jsp (CustomTheme8Dynamic/WebContent/themes/html/Default.jsp – Line 25 following):

--%><r:dataSource uri='<%="spa:" + pageContext.getAttribute("currentNavNodeID", PageContext.REQUEST_SCOPE)%>' escape="none"><%--
--%><r:param name="themeURI" value="${themeTemplateURI}"/><%--
--%><r:param name="mime-type" value="text/html"/><%--
--%><r:param name="max-age" value="2"/><%--

Also, make sure that


are set to the following : reloadingEnabled="true". Following are the steps

Make sure that you have valid ibm-web-ext.xmi file at following theme location


Once the file is located, change the following parameter in the same file.

reloadEnabled = true

<?xml version="1.0" encoding="UTF-8"?>
< xmi:version="2.0" xmlns:xmi="""webappext.xmi" xmi:id="WebAppExtension_1354713252538">
<webApp href="WEB-INF/web.xml#WebApp_ID"/>
<jspAttributes xmi:id="JSPAttribute_1354713252538" name="reloadEnabled" value="true"/>
<jspAttributes xmi:id="JSPAttribute_1354713252546" name="reloadInterval" value="10"/>

Save the file and restart the portal server. Once this is done, you also need to restart the application for the jsp changes to take into effect. JSP reloading should be disabled in a production environment because of performance issues.

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club