You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by osubb <la...@firstpac.com> on 2008/02/20 19:25:00 UTC

Configuring Default ROOT Context

I am trying to configure Tomcat v6.0.

I have a book that is about 4 years old and using it to install.  I am
having problems setting up for:
 1) Servlet reloading (it shows you how to do it for versions 4.xx, but this
doesn't seem to work (it tells you to key on a sentence to find where to add
some code '<DefaultContext reloadable="true"/>'.  But I could never find the
sentence when doing a search in server.xml.

 2) I would like to enable the ROOT context.  It says to uncomment the line
'<context path="' docBase="ROOT" debug="0"/>', but again, I can't find this
line in server.xml.

Any help would be great!

osubb
-- 
View this message in context: http://www.nabble.com/Configuring-Default-ROOT-Context-tp15595290p15595290.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Configuring Default ROOT Context

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: osubb [mailto:larryl@firstpac.com] 
> Subject: RE: Configuring Default ROOT Context
> 
> I was just going to use the Default context for
> development.

The conf/context.xml file is *not* the default context.  Instead, that
file specifies a set of default attributes to be applied to *all*
contexts.  The default context is the one associated with the webapp
named ROOT.

 - 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: Configuring Default ROOT Context

Posted by osubb <la...@firstpac.com>.
Thanks for the help.  I was just going to use the Default context for
development.  But I can do it the correct way.

osubb



Caldarale, Charles R wrote:
> 
>> From: osubb [mailto:larryl@firstpac.com] 
>> Subject: RE: Configuring Default ROOT Context
>>
>> I uncommented the "invoke servlet" sections in web.xml
> 
> Don't ever, ever do that; read the comments about the Invoker servlet in
> the FAQ:
> http://wiki.apache.org/tomcat/FAQ/Miscellaneous
> 
>> I made these changes:
>> context.xml:
>>   <Context path="" docBase="ROOT" reloadable="true"/>
> 
> *Read the doc links you were supposed to.*  (And ignore everything you
> read in that horribly outdated book you were supposed to throw away.)
> If you changed conf/context.xml, you broke your installation.    If you
> changed the one in your webapp's META-INF directory, the changes were
> ignored.  Unless your <Context> element is in server.xml - where it
> never should be - the path and docBase attributes aren't allowed.  You
> likely don't need a <Context> element at all - most webapps don't.
> 
> If you want to run your webapp as the default, just replace the contents
> of Tomcat's existing webapps/ROOT directory with your webapp, and it
> will become the default.  You will need proper servlet mappings in
> WEB-INF/web.xml, of course.  Read the servlet spec or look at the
> examples that come with Tomcat to see how to do it.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Configuring-Default-ROOT-Context-tp15595290p15624740.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Configuring Default ROOT Context

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: osubb [mailto:larryl@firstpac.com] 
> Subject: RE: Configuring Default ROOT Context
>
> I uncommented the "invoke servlet" sections in web.xml

Don't ever, ever do that; read the comments about the Invoker servlet in
the FAQ:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous

> I made these changes:
> context.xml:
>   <Context path="" docBase="ROOT" reloadable="true"/>

*Read the doc links you were supposed to.*  (And ignore everything you
read in that horribly outdated book you were supposed to throw away.)
If you changed conf/context.xml, you broke your installation.    If you
changed the one in your webapp's META-INF directory, the changes were
ignored.  Unless your <Context> element is in server.xml - where it
never should be - the path and docBase attributes aren't allowed.  You
likely don't need a <Context> element at all - most webapps don't.

If you want to run your webapp as the default, just replace the contents
of Tomcat's existing webapps/ROOT directory with your webapp, and it
will become the default.  You will need proper servlet mappings in
WEB-INF/web.xml, of course.  Read the servlet spec or look at the
examples that come with Tomcat to see how to do it.

 - 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: Configuring Default ROOT Context

Posted by osubb <la...@firstpac.com>.
I got the servlet reload to work, but can't get the default ROOT context to
work.

I uncommented the "invoke servlet" sections in web.xml and when I executed
any Servlets, I got a blank page.

I then commented them back out, and the Servlet worked fine (although I
could not execute under ROOT default app.

I made these changes:
context.xml:
  <Context path="" docBase="ROOT" reloadable="true"/>

web.xml:
   Uncommented the "invoker" servlet and it's mappings.

When I ran my Servlet under the default ROOT app and my own app - I got a
blank page - no output (no errors - so it found the Servlet?).

When I removed the changes in web.xml ("invoker" is now commented out) - my
Servlet worked under my app (not under ROOT).

thanks for any help

osubb



Caldarale, Charles R wrote:
> 
>> From: osubb [mailto:larryl@firstpac.com] 
>> Subject: Configuring Default ROOT Context
>> 
>> I have a book that is about 4 years old
> 
> Throw it away.  It will have little bearing on current practice.
> 
> All of the topics you're posting about have been complete redone.  Read
> the current docs:
> http://tomcat.apache.org/tomcat-6.0-doc/index.html
> http://tomcat.apache.org/tomcat-6.0-doc/config/index.html
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
> 
> The last one covers how the <Context> (not <context>) element works
> these days.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Configuring-Default-ROOT-Context-tp15595290p15617614.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Configuring Default ROOT Context

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: osubb [mailto:larryl@firstpac.com] 
> Subject: Configuring Default ROOT Context
> 
> I have a book that is about 4 years old

Throw it away.  It will have little bearing on current practice.

All of the topics you're posting about have been complete redone.  Read
the current docs:
http://tomcat.apache.org/tomcat-6.0-doc/index.html
http://tomcat.apache.org/tomcat-6.0-doc/config/index.html
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

The last one covers how the <Context> (not <context>) element works
these days.

 - 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