Forums Register Login

Forcing JSP Recompile

+Pie Number of slices to send: Send
I've run into a couple of instances when I've updated some java class files that will impact the jsps. However, the jsps themselves didn't need to be changed - and consequently were not re-compiled to show the impact of the other classes.
Is there a way to force a set of jsps to recompile besides deleting the class versions?
+Pie Number of slices to send: Send
if you restart your container..JRUN/Apache etc that should do it. Since an instance of the class is created when a JSP is first called, if the scope is set to be session closing all the browser windows and then re-logging (effectively starting a new session) will also acheive what you intend to.
-manav
+Pie Number of slices to send: Send
 

Originally posted by Pam Doucette:
Is there a way to force a set of jsps to recompile besides deleting the class versions?


There's a wonderful little unix program called "touch" which will update the timestamp on a file. There are gazillions of ports to Windows. All you'd have to do is create a little batch file which executes "touch *.jsp" in your JSP directory.
- Peter
+Pie Number of slices to send: Send
I too like "touch," but that approach does not work well with configuration management systems like Clearcase in which you would need to check-out each JSP as part of the batch file to "touch" it. So, in my case, I have found the easiest way to be to restart the web service, though sometimes I will also delete the entire classes directory to be certain the pages get recompiled.
You have to be odd to be #1 - Seuss. An odd little ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 622 times.
Similar Threads
default package
JSP not refreshing
Error while migrating
Recompile JSP's on Sun One
tomcat or netbeans
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:30:22.