Hi,
I have written a web application based on struts framework.
when I make changes to any of the classes I have to shutdown the tomcat server, move the new classes to the appropriate directory and restart. this can get very tedious, So does any one know of how to tackle this problem?
thank you
A
-
Tomcat Question (6 messages)
- Posted by: ahmed tantan
- Posted on: June 26 2003 13:25 EDT
Threaded Messages (6)
- Tomcat Question by Shannon Ewing on June 26 2003 14:26 EDT
- Tomcat by Sivaraman Natarajan on June 26 2003 15:42 EDT
- Tomcat Question by Paul Gier on June 26 2003 15:59 EDT
- Tomcat Question by Web Master on June 28 2003 15:05 EDT
- Tomcat Question by Klas Nyman on July 03 2003 10:57 EDT
- Tomcat Question by C A on July 15 2003 01:31 EDT
- Tomcat Question by Klas Nyman on July 03 2003 10:57 EDT
-
Tomcat Question[ Go to top ]
- Posted by: Shannon Ewing
- Posted on: June 26 2003 14:26 EDT
- in response to ahmed tantan
Tomcat does not support hot deployment with anything other than JSPs. Hey, it's a free reference implementation, what do you expect ;-) The good news is that the startup/shutdown process is much faster than most other containers. -
Tomcat[ Go to top ]
- Posted by: Sivaraman Natarajan
- Posted on: June 26 2003 15:42 EDT
- in response to Shannon Ewing
Try reloading it -
Tomcat Question[ Go to top ]
- Posted by: Paul Gier
- Posted on: June 26 2003 15:59 EDT
- in response to ahmed tantan
Check the Tomcat documentation for the server.xml configuration file. You can set reloadable="true" in the context and your class files will be reloaded when they change.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
If you add any new actions or change anything else in struts-config.xml you will still have to restart the server. -
Tomcat Question[ Go to top ]
- Posted by: Web Master
- Posted on: June 28 2003 15:05 EDT
- in response to ahmed tantan
When developing with Tomcat I set my dev directory inside of webapps. This way when I rebuild the classes I can simply restart the instance instead of the container. I set of my browser tabs (insert Mozilla/Opera/Safari/etc. plug here :)) to tomcat manager so after making changes I can restart whatever instance I'm working on in one tab and view the changes in another.
Hope you find this useful. -
Tomcat Question[ Go to top ]
- Posted by: Klas Nyman
- Posted on: July 03 2003 10:57 EDT
- in response to Web Master
I use Ant to build an war-file and config my apps Conetxt in server.xml to point out the war-file, no need to have dev projects in tomcats directory structure.
Compile and restart!
sample for server.xml:
<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="false" debug="0" docBase="D:/JAVA/AWEB/dist/aweb.war" mapperClass="org.apache.catalina.core.StandardContextMapper" path="/lfweb" privileged="false" reloadable="false" swallowOutput="false" useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
/Klas -
Tomcat Question[ Go to top ]
- Posted by: C A
- Posted on: July 15 2003 01:31 EDT
- in response to Klas Nyman
I agree with Paul Gear. That is the solution. In case of JBoss, it redeploys it automatically.