You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2008/11/18 18:52:12 UTC

RE: How do I configure server.xml for Tomcat to recognize my application directory?

> From: removeps-groups@yahoo.com [mailto:removeps-groups@yahoo.com]
> Subject: How do I configure server.xml for Tomcat to
> recognize my application directory?
>
> The application is in
> C:\public_html

You should put the application in a directory underneath public_html, not in public_html.  If you want it to be the default webapp, make that directory name ROOT (case sensitive, even on Windows).

> The directory structure of the application is

Move the files to:
C:\public_html\ROOT\index.html
C:\public_html\ROOT\WEB-INF\
C:\public_html\ROOT\WEB-INF\web.xml
C:\public_html\ROOT\META-INF
C:\public_html\ROOT\META-INF\context.xml

> It seems the the problem might be the directory structure,
> and appBase, and docBase.

Correct; keep reading.

> <Host name="localhost"  appBase="/public_html"
>       unpackWARs="true" autoDeploy="true"
>       xmlValidation="false" xmlNamespaceAware="false">

The above is mostly o.k.; appBase specifies the directory under which each webapp is deployed.  However, I would make it "C:/public_html", just in case you're in a different drive letter when Tomcat is started.

> <Context path="" docBase="/public_html">
> </Context>

This is bad.  The docBase attribute must *never* be the same as appBase, and you should not be placing <Context> elements in server.xml these days.  Just remove the entire <Context> element, since it's not needed.

What is in your webapp's META-INF/context.xml file?  It should not have either the path or the docBase attributes set.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How do I configure server.xml for Tomcat to recognize my application directory?

Posted by re...@yahoo.com.
Thanks to everyone.  I will try out these suggestions tonight and write back if they do not work.

In response to

> What is in your webapp's META-INF/context.xml file?  It
> should not have either the path or the docBase attributes
> set.

the file contents are as follows (note: no attributes in the Context element)

<Context>
   <Realm ...></Realm>
   <Resources .../></Resources>
</Context>



--- On Tue, 11/18/08, Caldarale, Charles R <Ch...@unisys.com> wrote:

> From: Caldarale, Charles R <Ch...@unisys.com>
> Subject: RE: How do I configure server.xml for Tomcat to recognize my  application directory?
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Date: Tuesday, November 18, 2008, 9:52 AM
> > From: removeps-groups@yahoo.com
> [mailto:removeps-groups@yahoo.com]
> > Subject: How do I configure server.xml for Tomcat to
> > recognize my application directory?
> >
> > The application is in
> > C:\public_html
> 
> You should put the application in a directory underneath
> public_html, not in public_html.  If you want it to be the
> default webapp, make that directory name ROOT (case
> sensitive, even on Windows).
> 
> > The directory structure of the application is
> 
> Move the files to:
> C:\public_html\ROOT\index.html
> C:\public_html\ROOT\WEB-INF\
> C:\public_html\ROOT\WEB-INF\web.xml
> C:\public_html\ROOT\META-INF
> C:\public_html\ROOT\META-INF\context.xml
> 
> > It seems the the problem might be the directory
> structure,
> > and appBase, and docBase.
> 
> Correct; keep reading.
> 
> > <Host name="localhost" 
> appBase="/public_html"
> >       unpackWARs="true"
> autoDeploy="true"
> >       xmlValidation="false"
> xmlNamespaceAware="false">
> 
> The above is mostly o.k.; appBase specifies the directory
> under which each webapp is deployed.  However, I would make
> it "C:/public_html", just in case you're in a
> different drive letter when Tomcat is started.
> 
> > <Context path=""
> docBase="/public_html">
> > </Context>
> 
> This is bad.  The docBase attribute must *never* be the
> same as appBase, and you should not be placing
> <Context> elements in server.xml these days.  Just
> remove the entire <Context> element, since it's
> not needed.
> 
> What is in your webapp's META-INF/context.xml file?  It
> should not have either the path or the docBase attributes
> set.
> 
>  - 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org