Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat context attributes
Tomcat context attributes [message #141167] Wed, 28 September 2005 20:13 Go to next message
Eclipse UserFriend
Originally posted by: at217.chebucto.ns.ca

I've been searching and reading through the archives, but a question
remains. I understand that the *children* of the Context element in a
META-INF/context.xml file are picked up and copied to the Tomcat
deployment. However, all the posts only talk about the child elements.
What about the attributes of the root Context element itself? Is there a
way to get those applied?

I realize that JST will have to override some of the attributes (e.g.
docBase), but it would be nice if the other attributes passed through as
set in the project's context.xml to the Eclipse Tomcat deployment. Perhaps
I've missed something, but it doesn't seem like this is the case, and I
can't find anything in the UI for setting context attributes (beyond path
and reloadable, in the Server>Modules settings). Even if I could set these
in .wtpmodules, or something like that, that would be fine too (but better
to only have them in one place, context.xml).

Thanks,
-- Michael
Re: Tomcat context attributes [message #141189 is a reply to message #141167] Wed, 28 September 2005 21:55 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Michael,

I have this on my todo list. Feel free to file an enhancement request
in bugzilla against the WebTools "jst.server" component if you would
like to track this. I'm not aware of a good workaround at the moment.

Cheers,
Larry

Michael Hackett wrote:
> I've been searching and reading through the archives, but a question
> remains. I understand that the *children* of the Context element in a
> META-INF/context.xml file are picked up and copied to the Tomcat
> deployment. However, all the posts only talk about the child elements.
> What about the attributes of the root Context element itself? Is there a
> way to get those applied?
>
> I realize that JST will have to override some of the attributes (e.g.
> docBase), but it would be nice if the other attributes passed through as
> set in the project's context.xml to the Eclipse Tomcat deployment. Perhaps
> I've missed something, but it doesn't seem like this is the case, and I
> can't find anything in the UI for setting context attributes (beyond path
> and reloadable, in the Server>Modules settings). Even if I could set these
> in .wtpmodules, or something like that, that would be fine too (but better
> to only have them in one place, context.xml).
>
> Thanks,
> -- Michael
Re: Tomcat context attributes [message #141299 is a reply to message #141189] Thu, 29 September 2005 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: at217.chebucto.ns.ca

OK, Larry. Will do. If you can point me in the general direction of where
to look, I could take a stab at the code. I checked out the source, but
couldn't figure out where to start. :-)

-- Michael


On Wed, 28 Sep 2005 17:55:59 -0400, Larry Isaacs wrote:

> I have this on my todo list. Feel free to file an enhancement request
> in bugzilla against the WebTools "jst.server" component if you would
> like to track this. I'm not aware of a good workaround at the moment.
[...]
> Michael Hackett wrote:
>> I've been searching and reading through the archives, but a question
>> remains. I understand that the *children* of the Context element in a
>> META-INF/context.xml file are picked up and copied to the Tomcat
>> deployment. However, all the posts only talk about the child elements.
>> What about the attributes of the root Context element itself? Is there a
>> way to get those applied?
[...]
Re: Tomcat context attributes [message #141358 is a reply to message #141299] Thu, 29 September 2005 15:49 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
If you want to take a look, see the "publishContextConfig()" method in
the appropriate
org.eclipse.jst.server.tomcat.core.internal.Tomcat??Configur ation, where
"??" is "40","41","50", or "55".

Cheers,
Larry

Michael Hackett wrote:
> OK, Larry. Will do. If you can point me in the general direction of where
> to look, I could take a stab at the code. I checked out the source, but
> couldn't figure out where to start. :-)
>
> -- Michael
>
>
> On Wed, 28 Sep 2005 17:55:59 -0400, Larry Isaacs wrote:
>
>
>>I have this on my todo list. Feel free to file an enhancement request
>>in bugzilla against the WebTools "jst.server" component if you would
>>like to track this. I'm not aware of a good workaround at the moment.
>
> [...]
>
>>Michael Hackett wrote:
>>
>>>I've been searching and reading through the archives, but a question
>>>remains. I understand that the *children* of the Context element in a
>>>META-INF/context.xml file are picked up and copied to the Tomcat
>>>deployment. However, all the posts only talk about the child elements.
>>>What about the attributes of the root Context element itself? Is there a
>>>way to get those applied?
>
> [...]
Re: Tomcat context attributes [message #142495 is a reply to message #141167] Wed, 05 October 2005 18:04 Go to previous message
Eclipse UserFriend
Originally posted by: cap_nemesis.hotmail.com

To change the "docBase" add the "-Dcatalina.base" argument of your server
configuration (double click on tomcat in Servers-view and then click "Open
launch Configuration") again, but with another directory at the end where
you will place you custom xml-files, like:

-Dcatalina.base=" C:\Eclipse_3_1\eclipse\workspace\.metadata\.plugins\org.ecli pse.wst.server.core\tmp0 "
-Dcatalina.home="C:\Programme\Apache Software Foundation\Tomcat 5.5"
-Djava.endorsed.dirs="C:\Programme\Apache Software Foundation\Tomcat
5.5\common\endorsed"
-Dcatalina.base=" C:\Eclipse_3_1\eclipse\workspace\.metadata\.plugins\org.ecli pse.wst.server.core\mytmp "

This works at least for tomcat 5.5


MD


"Michael Hackett" <at217@chebucto.ns.ca> schrieb im Newsbeitrag
news:pan.2005.09.28.20.13.39.868861@chebucto.ns.ca...
> I've been searching and reading through the archives, but a question
> remains. I understand that the *children* of the Context element in a
> META-INF/context.xml file are picked up and copied to the Tomcat
> deployment. However, all the posts only talk about the child elements.
> What about the attributes of the root Context element itself? Is there a
> way to get those applied?
>
> I realize that JST will have to override some of the attributes (e.g.
> docBase), but it would be nice if the other attributes passed through as
> set in the project's context.xml to the Eclipse Tomcat deployment. Perhaps
> I've missed something, but it doesn't seem like this is the case, and I
> can't find anything in the UI for setting context attributes (beyond path
> and reloadable, in the Server>Modules settings). Even if I could set these
> in .wtpmodules, or something like that, that would be fine too (but better
> to only have them in one place, context.xml).
>
> Thanks,
> -- Michael
Previous Topic:"Top-down" tutorial gives error IWAB0014E
Next Topic:Problem displaying tutorial snoop servlet in Tomcat
Goto Forum:
  


Current Time: Fri Apr 19 08:38:17 GMT 2024

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

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

Back to the top