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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 746
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
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
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: http://aspose.com/file-tools
subject: Updating your Action Servlets as runtime
Similar Threads
For those who eat java, think java and drink java
Restarting apache tomcat after changes in servlet and jsps
Dynamically reloading servlets
Restart server after JSP-change??
Restarting Websphere v5.0 Test Environment