- This topic has 4 replies, 3 voices, and was last updated 19 years, 9 months ago by ahanys.
-
AuthorPosts
-
acuretraMemberI do struts work at the momemnt and need to experiment quite a bit to get it right. Currently I need to restart the web container (Resin and Tomcat) in order to get it to reread the struts-config.xml file, which is a bit cumbersome.
Is there a simple way of telling MyEclipse to restart the web container when this file is changed. It knows to do it for other files, so this might be quite simple.
I am running a
Version: 3.8.4
Build id: 200501171200-3.8.4
Riyad KallaMemberThe best solution to this is to:
a) Use tomcat
b) Load up an extra browser window and connect to your Tomcat Manager webapp (http://localhost:8080, click on the Manager link on left and login)
c) See the Tomcat docs on how to setup access to the ManagerThen just click the “Restart” link next to the webapp you want to restart.
The fundamental problem here is that Struts was not written to reload changed struts-config.xml files so you need to force it to by restarting the webapp.
Actually, I think you can “Trick” tomcat into doing this by modifying your web.xml file, try adding a space, then removing it and saving the file.. Tomcat should pickup the changed web.xml file and reload the context.
acuretraMemberThank you for your reply.
I had not thought of doing it that way, and it does not help in Resin.
Is there a way to tell MyEclipse that _it_ needs to restart the web container if this file is changed?
Riyad KallaMemberI had not thought of doing it that way, and it does not help in Resin.
Did you see my web.xml trick? I believe that will work for any app server.
Is there a way to tell MyEclipse that _it_ needs to restart the web container if this file is changed?
Restarting the web context is what I’m guessing you meant and no there isn’t a way. We support 20+ app servers, so we keep our app-server-specific features to a minimum because implementing that functionality once means we need to implement it 20 other times for all other connectors, and each one is totally different.
ahanysMember@support-rkalla wrote:
I had not thought of doing it that way, and it does not help in Resin.
Did you see my web.xml trick? I believe that will work for any app server.
Is there a way to tell MyEclipse that _it_ needs to restart the web container if this file is changed?
Restarting the web context is what I’m guessing you meant and no there isn’t a way. We support 20+ app servers, so we keep our app-server-specific features to a minimum because implementing that functionality once means we need to implement it 20 other times for all other connectors, and each one is totally different.
DO IT THIS WAY:
When the user changes struts-config.xml than you programmatically change the web.xml file timestamp or add/delete space in web.xml file. This way you will implement the same way the web-context restarting functionality on every web container.Isn’t it?
🙂 -
AuthorPosts