Our method of deploying a new version of an app for weblogic (11g) is to copy over top of the existing ear file and then stop and restart the weblogic server. We do a start/stop of weblogic rather than a redeployment, because of the known permgen issue (where eventually we will run out of perm gen and have to bounce the weblogic server).
However, this method of deploying has a drawback-- new JSP versions are not seen by weblogic. In order to fix this we have had to wipe out the contents of the tmp directory that maintain a cache of the compiled JSPs prior to restarting the server. Is there a setting that would tell weblogic to wipe the cache/reload/recompile JSPs when it starts back up?
Changing the JSP refresh timer
A standard solution is to tell Weblogic to check JSP freshness more frequently by either setting the value in your
web.xml
or in yourweblogic.xml
.In production mode, Weblogic won't check for new JSP versions (default value: -1) while it does each second in development mode (default value: 1).
The choice between modifying
web.xml
orweblogic.xml
is up to you, regarding the application servers you target, being WebLogic only or not.If you prefer to modify
web.xml
, then set a value for the context parameterweblogic.jsp.pageCheckSeconds
as follows:If you prefer to modify
weblogic.xml
, then set a value for parameterpage-check-seconds
in thejsp-descriptor
section. Here is the relevant excerpt from the documentation:Source: http://docs.oracle.com/cd/E21764_01/web.1111/e13712/weblogic_xml.htm#i1038490
Forcing redeployment
Restarting Weblogic server does not force it to redeploy a Web Application (especially in production mode).
Solution Trigger explicitly the "redeploy" life-cycle operation using command line like this:
Note that
-redeploy
is WAYS much safer than-update
, esp. with Weblogic <= 10.xKeep first block between [ ], only if the server is not local. Remove the [ ] in that case.
Keep second block between [ ], if you want to combine the WAR file uploading in the same step, which is way simpler. Remove the [ ] in that case.
To avoid this you should first update your Module and then restart the server..this should fix your problem.
Although process mentioned by is always give 100% correctness. But you can try above mentioned steps.