tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AD <straightfl...@gmail.com>
Subject Re: root context path - war file not unwar'd
Date Tue, 20 Jan 2009 16:33:20 GMT
Thanks charles, i thought there was an easier way to make a default webapp
other than naming it ROOT.war.

I will give that a shot to see if it works.

Adam



On Mon, Jan 19, 2009 at 10:36 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: AD [mailto:straightflush@gmail.com]
> > Subject: root context path - war file not unwar'd
> >
> > I have an issue where inside a <host> i set the context path
> > of "/" to a directory inside webapps (myapp).
>
> This is bad practice, and gets your webapp deployed twice.  Sounds like you
> also didn't remove the existing webapps/ROOT directory, so you now have two
> webapps fighting to be the default one.  Since you're not doing things in
> the recommended fashion, no particular behavior is guaranteed.
>
> What you should be doing:
>
> 1) Delete the existing webapps/ROOT directory, thereby removing the dummy
> default webapp that ships with Tomcat.
>
> 2) Delete everything under Tomcat's work directory, since that likely is
> very confused by now.
>
> 3) Remove the <Context> element from server.xml - it doesn't belong there.
>
> 4) Rename your webapp to ROOT.war, so it becomes the default webapp.
>
> 5) If you actually need a <Context> element for your webapp, place it in
> META-INF/context.xml inside the ROOT.war file, or in
> conf/Catalina/[host]/ROOT.xml; in either case, remove the path and docBase
> attributes, since they're not allowed.  (If your <Context> element contained
> only path and docBase, you don't need one at all.)
>
> When redeploying a webapp, don't just randomly delete directories while
> Tomcat is running.  Use the manager webapp or the appropriate ant script to
> do a proper redeployment.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message