开发者

How do you force JSP to get re-compiled

I'm trying out a new version of a web framework, and need to re-compile all my Jsps.

What is the easi开发者_JAVA技巧est way to do this?

I'm using Weblogic (Oracle) 10.3.3, but we can use this question to collate methods to force recompiles for all servers here. Also I'm working on a dev box, so there no problem stoping/ starting the server, or deleting tmp directories.

Note: The most generic way I've found, is to update (touch) your jsp files.

find ./ -name '*.jsp' -exec touch {} \; 

This however might not be very easy if you have a lot of files, and or are working on a non unix environement (As I am, and I can't install cygwin)


To answer my own question:

For Tomcat. Deleting the following directory will cause all jsps to get recompiled.

${CATALINA_HOME}/work/Catalina/localhost/$WEBAPP

For Oracle Weblogic Server (10.3.3) Deleting the following directory (on my server) will cause jsps in to get recompiled, e.g.

${DOMAIN_HOME}/servers/AdminServer/tmp/_WL_user/<WAR_Name>/lussfm/jsp_servlet/_jsp/


What build environment are you using?

If you're using ant or maven, I would suggest seeing if there is a way to force a copy of the JSP files regardless of modified time.

Since you indicated you are using ANT for your build system, I would add a target to your build to use the touch ant task. The documentation linked should point you in the right direction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜