style="WIDTH: 345px; HEIGHT: 285px" align="left" marginwidth="0" marginheight="0" src="http://www.ymfund.com/web/ad.html" frameborder="0" width="468" scrolling="no" height="60">
在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