This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Updating your Action Servlets as runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Updating your Action Servlets as runtime" Watch "Updating your Action Servlets as runtime" New topic

Updating your Action Servlets as runtime

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 751
Hi guys, I was wondering... In plain ol servlets, when you make changes to your servlet, you would usually have to restart tomcat. Since I haven't tested struts on a live running site(uploaded on the internet) with users accessing your files/classes most of the time. Would it be ok to just replace the old class files with a new one without restarting the server? I'm getting a little anxious about the impact it could cause to my app's performance. I have a feeling that there would be frequent changes, and that It would require me to update the classes on the server as soon as changes are made. Thanks!

SCJP 1.5 -
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
When I'm testing, I frequently make changes to my Action and model classes without restarting the application. Most of the time, it works fine, but there are a few "gotchas". I find that if I try to change a Static field or method, it doesn't work. I have to restart. If you make changes to your struts-config.xml file, there's no getting around it.. you must restart the application.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Updating your Action Servlets as runtime
It's not a secret anymore!