struts & restarting Tomcat

M

Mike

I'm developing a struts application and the only way I've found for a
change in the action class to be recognized is to restart Tomcat.

Is there an easier way?
 
W

William Brogden

I'm developing a struts application and the only way I've found for a
change in the action class to be recognized is to restart Tomcat.

Is there an easier way?

Using the Management Application to restart the application
is pretty convenient. Documentation was installed with your
copy of Tomcat.

Bill
 
S

Sebastian Millies

It's marginally more convenient. For me, the big pain point is having
to restart the application at all when only struts-config.xml changes.
There must be some good reason why a Struts-based app can't
reconfigure itself, but I haven't found it documented.

-- Sebastian
 
N

Nathan Zumwalt

It's easier said than done. There are a lot of issues around changing
configuration on the fly like that (caching, detecting changes, etc).
It's been a while since I worked with Struts, but from what I
remember, most of the time when I changed struts-config.xml, I also
made a change to a class, which meant I had to restart anyway. On top
of all that, Tomcat starts so quickly (compared to WebLogic,
WebSphere, etc).

If you want it badly, though, you can always implement it yourself.
I'm sure the Apache Foundation would happily take your contribution.

//Nathan
 
G

GIMME

Try putting your application initialization code into a SetUpServlet
and running this servlet after compiling. (Your SetUpServlet
has to be mapped in the web.xml file).

That works for me.

Note that any session data not populated by the SetUpServlet is lost.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top