Home » Language IDEs » ServerTools (WTP) » Double invocation of contexts
Double invocation of contexts [message #156931] |
Tue, 17 January 2006 15:38 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: caclark.etechsolutions.net
I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance release.
It migrated a couple of Web projects I have. When I add the projects to
a Tomcat 5.5 server definition and start it, the contexts are invoked
twice each. One of the apps fires up the Dumbster fake email server and
the other starts several threads to handle requests. Both have logging
turned on so I see both start twice.
Has anyone else seen this behavior? If so, what'd you do to cure it? I
have several other apps that I'd like to add to the server that run in
other contexts, so the doubled work load is not a good thing.
Thanks,
Cary
|
|
|
Re: Double invocation of contexts [message #156947 is a reply to message #156931] |
Tue, 17 January 2006 17:11 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: caclark.etechsolutions.net
Cary said the following on 1/17/2006 9:38 AM:
> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance release. It
> migrated a couple of Web projects I have. When I add the projects to a
> Tomcat 5.5 server definition and start it, the contexts are invoked
> twice each. One of the apps fires up the Dumbster fake email server and
> the other starts several threads to handle requests. Both have logging
> turned on so I see both start twice.
>
> Has anyone else seen this behavior? If so, what'd you do to cure it? I
> have several other apps that I'd like to add to the server that run in
> other contexts, so the doubled work load is not a good thing.
>
> Thanks,
> Cary
I left the "Run modules directly from the workspace" checked like all of
my other installations. It's publishing the projects into the
workspace's .metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps
directory. I looked in the server.xml generated for this server and it
put the <Context>s in only once.
|
|
|
Re: Double invocation of contexts [message #156955 is a reply to message #156931] |
Tue, 17 January 2006 17:22 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Larry Isaacs![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=larryisaacs%40mindspring.com) Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
Starting with WTP 1.0, projects are published to Tomcat's CATALINA_BASE
"webapps" directory. With the default configuration of Tomcat, this
guarantees you will get one context served using the apps directory
name. At the moment, the Tomcat support uses the project name to
publish the app, so if you specified a different context-root in your
project, then the resulting <Context> element added to server.xml will
invoke another context using the context-root. For now, the simplest
way to avoid this is to keep the project name and the context-root the
same. If this approach can't be used, you can turn off auto-serving by
setting in the server.xml:
<Host deployOnStartup="false" autoDeploy="false" ...>
This will disable auto-serving of the "default" ROOT webapp. Adding the
following context to server.xml should bring it back:
<Context docBase="ROOT" path="" reloadable="false"/>
Reloading shouldn't be needed since it doesn't change.
HTH,
Larry
Cary wrote:
> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance release. It
> migrated a couple of Web projects I have. When I add the projects to a
> Tomcat 5.5 server definition and start it, the contexts are invoked
> twice each. One of the apps fires up the Dumbster fake email server and
> the other starts several threads to handle requests. Both have logging
> turned on so I see both start twice.
>
> Has anyone else seen this behavior? If so, what'd you do to cure it? I
> have several other apps that I'd like to add to the server that run in
> other contexts, so the doubled work load is not a good thing.
>
> Thanks,
> Cary
|
|
|
Re: Double invocation of contexts [message #157000 is a reply to message #156955] |
Tue, 17 January 2006 19:35 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: caclark.etechsolutions.net
Yep, that was it. I have my projects named with long, readable names
but the context roots are short. I set the 2 attributes on the <Host>
that you suggested and things are good.
While the topic is current, what prevents the Tomcat server def from
using the context root specified in .components? I know there's always
the special case of having an empty one. Are there others?
BTW, am I the only one that runs apps frequently without a context root?
The Glassfish and Geronimo plugins have real difficulty with that.
Thanks for the pointers,
Cary
Larry Isaacs said the following on 1/17/2006 11:22 AM:
> Starting with WTP 1.0, projects are published to Tomcat's CATALINA_BASE
> "webapps" directory. With the default configuration of Tomcat, this
> guarantees you will get one context served using the apps directory
> name. At the moment, the Tomcat support uses the project name to
> publish the app, so if you specified a different context-root in your
> project, then the resulting <Context> element added to server.xml will
> invoke another context using the context-root. For now, the simplest
> way to avoid this is to keep the project name and the context-root the
> same. If this approach can't be used, you can turn off auto-serving by
> setting in the server.xml:
>
> <Host deployOnStartup="false" autoDeploy="false" ...>
>
> This will disable auto-serving of the "default" ROOT webapp. Adding the
> following context to server.xml should bring it back:
>
> <Context docBase="ROOT" path="" reloadable="false"/>
>
> Reloading shouldn't be needed since it doesn't change.
>
> HTH,
> Larry
>
> Cary wrote:
>> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance release.
>> It migrated a couple of Web projects I have. When I add the projects
>> to a Tomcat 5.5 server definition and start it, the contexts are
>> invoked twice each. One of the apps fires up the Dumbster fake email
>> server and the other starts several threads to handle requests. Both
>> have logging turned on so I see both start twice.
>>
>> Has anyone else seen this behavior? If so, what'd you do to cure it?
>> I have several other apps that I'd like to add to the server that run
>> in other contexts, so the doubled work load is not a good thing.
>>
>> Thanks,
>> Cary
|
|
|
Re: Double invocation of contexts [message #157023 is a reply to message #157000] |
Tue, 17 January 2006 21:23 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Larry Isaacs![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=larryisaacs%40mindspring.com) Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
This behavior is a side effect of the ".deployables" directory (from WTP
0.7) going away, and which hasn't been properly addressed yet in WTP
1.0. It's on my to-do list to check for an existing bug and enter one
if there isn't one already. Also on the to-do list is to think about
how it should be addressed. There may be enough reasons that webapps
shouldn't be published to the "webapps" directory.
As for your question, WTP should be using the context-root from
..components. In 0.7x, specifying "" as was supported. That webapp
would take precedence and "replace" the ROOT webapp that is there by
default. Regrettably, I haven't had time to test if this still works in
WTP 1.0.
Cheers,
Larry
Cary wrote:
> Yep, that was it. I have my projects named with long, readable names
> but the context roots are short. I set the 2 attributes on the <Host>
> that you suggested and things are good.
>
> While the topic is current, what prevents the Tomcat server def from
> using the context root specified in .components? I know there's always
> the special case of having an empty one. Are there others?
>
> BTW, am I the only one that runs apps frequently without a context root?
> The Glassfish and Geronimo plugins have real difficulty with that.
>
> Thanks for the pointers,
> Cary
>
>
>
> Larry Isaacs said the following on 1/17/2006 11:22 AM:
>
>> Starting with WTP 1.0, projects are published to Tomcat's
>> CATALINA_BASE "webapps" directory. With the default configuration of
>> Tomcat, this guarantees you will get one context served using the apps
>> directory name. At the moment, the Tomcat support uses the project
>> name to publish the app, so if you specified a different context-root
>> in your project, then the resulting <Context> element added to
>> server.xml will invoke another context using the context-root. For
>> now, the simplest way to avoid this is to keep the project name and
>> the context-root the same. If this approach can't be used, you can
>> turn off auto-serving by setting in the server.xml:
>>
>> <Host deployOnStartup="false" autoDeploy="false" ...>
>>
>> This will disable auto-serving of the "default" ROOT webapp. Adding
>> the following context to server.xml should bring it back:
>>
>> <Context docBase="ROOT" path="" reloadable="false"/>
>>
>> Reloading shouldn't be needed since it doesn't change.
>>
>> HTH,
>> Larry
>>
>> Cary wrote:
>>
>>> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance release.
>>> It migrated a couple of Web projects I have. When I add the projects
>>> to a Tomcat 5.5 server definition and start it, the contexts are
>>> invoked twice each. One of the apps fires up the Dumbster fake email
>>> server and the other starts several threads to handle requests. Both
>>> have logging turned on so I see both start twice.
>>>
>>> Has anyone else seen this behavior? If so, what'd you do to cure
>>> it? I have several other apps that I'd like to add to the server
>>> that run in other contexts, so the doubled work load is not a good
>>> thing.
>>>
>>> Thanks,
>>> Cary
|
|
|
Re: Double invocation of contexts [message #157031 is a reply to message #157023] |
Tue, 17 January 2006 22:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: caclark.etechsolutions.net
I have several web apps deployed into this Tomcat server now. I have
the latest maintenance drop of the code, so there is the J2EE property
page for the projects. I have one that has nothing in there. Its
..component has this line:
<property name="context-root" />
which you would expect. In the server.xml, the context has this path
attribute: path=""
It does, in fact, replace the default ROOT web app; I've been running
some real world tests on it. So, that part is working in 1.0.x....
BTW, the latest maintenance drop has done wonders for performance. I
recommend everyone that was have performance issues with 1.0 update
immediately.
Thanks for your help.
Cary
Larry Isaacs said the following on 1/17/2006 3:23 PM:
> This behavior is a side effect of the ".deployables" directory (from WTP
> 0.7) going away, and which hasn't been properly addressed yet in WTP
> 1.0. It's on my to-do list to check for an existing bug and enter one
> if there isn't one already. Also on the to-do list is to think about
> how it should be addressed. There may be enough reasons that webapps
> shouldn't be published to the "webapps" directory.
>
> As for your question, WTP should be using the context-root from
> .components. In 0.7x, specifying "" as was supported. That webapp
> would take precedence and "replace" the ROOT webapp that is there by
> default. Regrettably, I haven't had time to test if this still works in
> WTP 1.0.
>
> Cheers,
> Larry
>
> Cary wrote:
>> Yep, that was it. I have my projects named with long, readable names
>> but the context roots are short. I set the 2 attributes on the <Host>
>> that you suggested and things are good.
>>
>> While the topic is current, what prevents the Tomcat server def from
>> using the context root specified in .components? I know there's
>> always the special case of having an empty one. Are there others?
>>
>> BTW, am I the only one that runs apps frequently without a context
>> root? The Glassfish and Geronimo plugins have real difficulty with
>> that.
>>
>> Thanks for the pointers,
>> Cary
>>
>>
>>
>> Larry Isaacs said the following on 1/17/2006 11:22 AM:
>>
>>> Starting with WTP 1.0, projects are published to Tomcat's
>>> CATALINA_BASE "webapps" directory. With the default configuration of
>>> Tomcat, this guarantees you will get one context served using the
>>> apps directory name. At the moment, the Tomcat support uses the
>>> project name to publish the app, so if you specified a different
>>> context-root in your project, then the resulting <Context> element
>>> added to server.xml will invoke another context using the
>>> context-root. For now, the simplest way to avoid this is to keep the
>>> project name and the context-root the same. If this approach can't
>>> be used, you can turn off auto-serving by setting in the server.xml:
>>>
>>> <Host deployOnStartup="false" autoDeploy="false" ...>
>>>
>>> This will disable auto-serving of the "default" ROOT webapp. Adding
>>> the following context to server.xml should bring it back:
>>>
>>> <Context docBase="ROOT" path="" reloadable="false"/>
>>>
>>> Reloading shouldn't be needed since it doesn't change.
>>>
>>> HTH,
>>> Larry
>>>
>>> Cary wrote:
>>>
>>>> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance
>>>> release. It migrated a couple of Web projects I have. When I add
>>>> the projects to a Tomcat 5.5 server definition and start it, the
>>>> contexts are invoked twice each. One of the apps fires up the
>>>> Dumbster fake email server and the other starts several threads to
>>>> handle requests. Both have logging turned on so I see both start
>>>> twice.
>>>>
>>>> Has anyone else seen this behavior? If so, what'd you do to cure
>>>> it? I have several other apps that I'd like to add to the server
>>>> that run in other contexts, so the doubled work load is not a good
>>>> thing.
>>>>
>>>> Thanks,
>>>> Cary
|
|
|
Re: Double invocation of contexts [message #157157 is a reply to message #157031] |
Wed, 18 January 2006 17:08 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: caclark.etechsolutions.net
Cary said the following on 1/17/2006 4:01 PM:
> I have several web apps deployed into this Tomcat server now. I have
> the latest maintenance drop of the code, so there is the J2EE property
> page for the projects. I have one that has nothing in there. Its
> .component has this line:
> <property name="context-root" />
> which you would expect. In the server.xml, the context has this path
> attribute: path=""
>
> It does, in fact, replace the default ROOT web app; I've been running
> some real world tests on it. So, that part is working in 1.0.x....
>
> BTW, the latest maintenance drop has done wonders for performance. I
> recommend everyone that was have performance issues with 1.0 update
> immediately.
>
> Thanks for your help.
>
> Cary
>
>
> Larry Isaacs said the following on 1/17/2006 3:23 PM:
>> This behavior is a side effect of the ".deployables" directory (from
>> WTP 0.7) going away, and which hasn't been properly addressed yet in
>> WTP 1.0. It's on my to-do list to check for an existing bug and enter
>> one if there isn't one already. Also on the to-do list is to think
>> about how it should be addressed. There may be enough reasons that
>> webapps shouldn't be published to the "webapps" directory.
>>
>> As for your question, WTP should be using the context-root from
>> .components. In 0.7x, specifying "" as was supported. That webapp
>> would take precedence and "replace" the ROOT webapp that is there by
>> default. Regrettably, I haven't had time to test if this still works
>> in WTP 1.0.
>>
>> Cheers,
>> Larry
>>
>> Cary wrote:
>>> Yep, that was it. I have my projects named with long, readable names
>>> but the context roots are short. I set the 2 attributes on the
>>> <Host> that you suggested and things are good.
>>>
>>> While the topic is current, what prevents the Tomcat server def from
>>> using the context root specified in .components? I know there's
>>> always the special case of having an empty one. Are there others?
>>>
>>> BTW, am I the only one that runs apps frequently without a context
>>> root? The Glassfish and Geronimo plugins have real difficulty with
>>> that.
>>>
>>> Thanks for the pointers,
>>> Cary
>>>
>>>
>>>
>>> Larry Isaacs said the following on 1/17/2006 11:22 AM:
>>>
>>>> Starting with WTP 1.0, projects are published to Tomcat's
>>>> CATALINA_BASE "webapps" directory. With the default configuration
>>>> of Tomcat, this guarantees you will get one context served using the
>>>> apps directory name. At the moment, the Tomcat support uses the
>>>> project name to publish the app, so if you specified a different
>>>> context-root in your project, then the resulting <Context> element
>>>> added to server.xml will invoke another context using the
>>>> context-root. For now, the simplest way to avoid this is to keep
>>>> the project name and the context-root the same. If this approach
>>>> can't be used, you can turn off auto-serving by setting in the
>>>> server.xml:
>>>>
>>>> <Host deployOnStartup="false" autoDeploy="false" ...>
>>>>
>>>> This will disable auto-serving of the "default" ROOT webapp. Adding
>>>> the following context to server.xml should bring it back:
>>>>
>>>> <Context docBase="ROOT" path="" reloadable="false"/>
>>>>
>>>> Reloading shouldn't be needed since it doesn't change.
>>>>
>>>> HTH,
>>>> Larry
>>>>
>>>> Cary wrote:
>>>>
>>>>> I've clean installed Eclipse 3.1.1 and WTP 1.0.1 maintenance
>>>>> release. It migrated a couple of Web projects I have. When I add
>>>>> the projects to a Tomcat 5.5 server definition and start it, the
>>>>> contexts are invoked twice each. One of the apps fires up the
>>>>> Dumbster fake email server and the other starts several threads to
>>>>> handle requests. Both have logging turned on so I see both start
>>>>> twice.
>>>>>
>>>>> Has anyone else seen this behavior? If so, what'd you do to cure
>>>>> it? I have several other apps that I'd like to add to the server
>>>>> that run in other contexts, so the doubled work load is not a good
>>>>> thing.
>>>>>
>>>>> Thanks,
>>>>> Cary
Just a follow up on the context root. It must have worked be it was set
that way before the 1.0 install. If you type anything in the property
page's Context Root field, it will not let you set it empty. I'll look
to see if there's a bug open on this and open one if not.
Cary
|
|
|
Goto Forum:
Current Time: Sun Sep 01 07:43:06 GMT 2024
Powered by FUDForum. Page generated in 0.03899 seconds
|