Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Setting context for tomcat 5.0
Setting context for tomcat 5.0 [message #179760] Sun, 24 September 2006 20:25 Go to next message
Alan Chandler is currently offline Alan Chandler
Messages: 45
Registered: July 2009
Member
I have been conducting some experiments with tomcat 5.0 as to where the
webapp context should be stored, other than conf/server.xml

It seems that is should be in conf/Catalina/localhost/webappname.xml
where webappname is the name of the particular context.

How are you supposed to get eclipse to load that up. I tried editing
the server config and putting it there, but nothing happened when it
started the server.
Re: Setting context for tomcat 5.0 [message #179825 is a reply to message #179760] Mon, 25 September 2006 14:46 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
What usually works best is to create a META-INF/context.xml file in the
"WebContent" portion of your web project. As part of publishing the
server and its web projects, the child elements of the Context in that
context.xml file along with most of its attributes will be incorporated
into the server.xml that Tomcat runs.

After adding a web project to the server, modifying the server.xml under
the Servers project in your workspace also works. However, if you
remove the web project from the server, that configuration is lost.

Cheers,
Larry

Alan Chandler wrote:
> I have been conducting some experiments with tomcat 5.0 as to where the
> webapp context should be stored, other than conf/server.xml
>
> It seems that is should be in conf/Catalina/localhost/webappname.xml
> where webappname is the name of the particular context.
>
> How are you supposed to get eclipse to load that up. I tried editing
> the server config and putting it there, but nothing happened when it
> started the server.
Re: Setting context for tomcat 5.0 [message #179848 is a reply to message #179825] Mon, 25 September 2006 16:15 Go to previous messageGo to next message
Eclipse User
Originally posted by: alan.chandler.logicacmg.com

On Mon, 25 Sep 2006 10:46:40 -0400, Larry Isaacs
<Larry.Isaacs@sas.com> wrote:

>What usually works best is to create a META-INF/context.xml file in the
>"WebContent" portion of your web project. As part of publishing the
>server and its web projects, the child elements of the Context in that
>context.xml file along with most of its attributes will be incorporated
>into the server.xml that Tomcat runs.
>

Are you saying that WTP is doing the work of taking the contents of
this context.xml and putting it into the server.xml section?

>After adding a web project to the server, modifying the server.xml under
>the Servers project in your workspace also works. However, if you
>remove the web project from the server, that configuration is lost.
>
>Cheers,
>Larry
>
>Alan Chandler wrote:
>> I have been conducting some experiments with tomcat 5.0 as to where the
>> webapp context should be stored, other than conf/server.xml
>>
>> It seems that is should be in conf/Catalina/localhost/webappname.xml
>> where webappname is the name of the particular context.
>>
>> How are you supposed to get eclipse to load that up. I tried editing
>> the server config and putting it there, but nothing happened when it
>> started the server.
Re: Setting context for tomcat 5.0 [message #179856 is a reply to message #179848] Mon, 25 September 2006 16:21 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Alan Chandler wrote:
> On Mon, 25 Sep 2006 10:46:40 -0400, Larry Isaacs
> <Larry.Isaacs@sas.com> wrote:
>
>> What usually works best is to create a META-INF/context.xml file in the
>> "WebContent" portion of your web project. As part of publishing the
>> server and its web projects, the child elements of the Context in that
>> context.xml file along with most of its attributes will be incorporated
>> into the server.xml that Tomcat runs.
>>
>
> Are you saying that WTP is doing the work of taking the contents of
> this context.xml and putting it into the server.xml section?

Yes, for each project added to a Tomcat server (i.e. for each project
related Context in the server.xml under the Servers project), if a
META-INF/context.xml exists in the project, its "contents" are included
in the server.xml that gets published to the "conf" directory where
catalina.base points in the launch configuration.

>
>> After adding a web project to the server, modifying the server.xml under
>> the Servers project in your workspace also works. However, if you
>> remove the web project from the server, that configuration is lost.
>>
>> Cheers,
>> Larry
>>
>> Alan Chandler wrote:
>>> I have been conducting some experiments with tomcat 5.0 as to where the
>>> webapp context should be stored, other than conf/server.xml
>>>
>>> It seems that is should be in conf/Catalina/localhost/webappname.xml
>>> where webappname is the name of the particular context.
>>>
>>> How are you supposed to get eclipse to load that up. I tried editing
>>> the server config and putting it there, but nothing happened when it
>>> started the server.
>
Re: Setting context for tomcat 5.0 [message #179888 is a reply to message #179856] Mon, 25 September 2006 18:25 Go to previous message
Alan Chandler is currently offline Alan Chandler
Messages: 45
Registered: July 2009
Member
Larry Isaacs wrote:
>
> Yes, for each project added to a Tomcat server (i.e. for each project
> related Context in the server.xml under the Servers project), if a
> META-INF/context.xml exists in the project, its "contents" are
> included in the server.xml that gets published to the "conf" directory
> where catalina.base points in the launch configuration.

Thats wonderful. Now - once we have fixed the problem with the local
server on my workstation being discussed in another thread, perhaps you
can teach me how to publish to a server on another machine:-)
Previous Topic:Exception handling with JAX-RPC
Next Topic:problem when attempting to implement a GenericPublisher
Goto Forum:
  


Current Time: Mon Sep 22 04:23:38 GMT 2014

Powered by FUDForum. Page generated in 0.01730 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software