Subject: Re: How to deploy Struts-using app to Tomcat 4 from Forte?
From: "Jeff" <[EMAIL PROTECTED]>
 ===
Well, as it turns out, the problem was with Tomcat. Specifically, Tomcat
4.0.1. After discovering the huge number of bugfixes between 4.0.1 and
4.0.2, I upgraded the server to Tomcat 4.0.3, and struts-example worked
fine. Mostly. Tomcat 4 still needs a lot of work.

It looks like my use of two and three-part paths
(appname/function/subfunction.do) was a lucky coincidence, because deploying
to "/" still doesn't appear to work reliably, even if it's technically
allowed.

Unfortunately, Tomcat 4.0.3 -is- still exhibiting a little bit of
weirdness... after deploying an app via .war file, it seems to take a couple
of restarts before *.do pages will load without throwing a 500 error, but
once the first one works, they all seem to be fine thereafter.

The usual sequence:

/usr/local/tomcat/bin/shutdown.sh
(tomcat shuts down)
rm -rf /usr/local/tomcat/webapps/appname
rm /usr/local/tomcat/webapps/appname.war
(new .war file uploaded)
/usr/local/tomcat/bin/startup.sh
(tomcat gives a thoroughly inadequate indication that it's started)
(/usr/local/tomcat/webapps/appname directory re-appears)
(wait another 20 seconds or so... verify that the size of the "appname"
directory hasn't changed, then wait another 10 seconds or so)
http://host:8080/appname
(index.html loads fine)
(click link to /appname/menu.do)
(crash and burn)
/usr/local/tomcat/bin/shutdown.sh
(count to 10)
/usr/local/tomcat/bin/startup.sh
(count to 10)
http://host:8080/appname -> http://host:8080/appname/menu.do
(crash and burn)
http://host:8080/manager/reload?path=/appname
(success)
http://host:8080/appname/menu.do
(crash and burn)
/usr/local/tomcat/bin/shutdown.sh
(count to 10)
/usr/local/tomcat/bin/startup.sh
(count to 10)
http://host:8080/appname -> http://host:8080/appname/menu.do
(WORKS!)

>From what I've concluded through various experiments, it's necessary to
restart, reload w/manager app, then restart again. Restarting by itself
won't do it (regardless of how many times in a row it's done), but running
/manager/reload itself doesn't do the trick either, and running it before
the first restart doesn't seem to fix whatever needs to be fixed. For
whatever reason, stop-delete-copy-start-restart-reload-restart seems to be
the required sequence.

My opinion of Tomcat 4 is still abyssmally low at the moment, but
unfortunatley I'm stuck with it because a few apps written by a co-worker
require 2.3/1.2 features.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to