在Websphere中修改JSP页面后刷新不生效解决方法
每次在Websphere中修改了JSP文件在前台页面刷新都不生效,还是没有改之前的状态,甚至把缓存中的.class文件清除后再刷新也是没有反应。导致每次都要删缓存然后再重启Websphere才生效,头痛死了。
解决方法:
打开 /WEB-INF/ 下面的 ibm-web-ext.xmi 文件,原来ibm-web-ext.xmi 文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmi:id="WebAppExtension_1" reloadInterval="5" reloadingEnabled="false" defaultErrorPage="error.jsp" additionalClassPath="" fileServingEnabled="false" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="true" autoRequestEncoding="true" autoResponseEncoding="false">
<webApp href="WEB-INF/web.xml#WebApp_ID"/>
<jspAttributes xmi:id="JSPAttribute_1" name="reloadEnabled" value="true"/>
</webappext:WebAppExtension>
红色部分为加入的,设置reloadEnabled 属性为 true,设置好后必须重新启动Websphere才能生效。
其它可设置的属性类似还有:
<jspAttributes xmi:id="JSPAttribute_1" name="useThreadTagPool" value="true"/>
<jspAttributes xmi:id="JSPAttribute_2" name="disableJspRuntimeCompilation" value="true"/>
<jspAttributes xmi:id="JSPAttribute_3" name="useFullPackageNames" value="true"/>
具体属性可参考IBM网站:
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/rweb_jspreloading.html
本文介绍了解决Websphere中JSP页面修改后无法实时刷新显示的问题。通过配置ibm-web-ext.xmi文件中的reloadEnabled属性为true,使JSP页面能够实现在不重启服务器的情况下生效。
3万+

被折叠的 条评论
为什么被折叠?



