Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WTP 2.0 and Tomcat instance
WTP 2.0 and Tomcat instance [message #196080] Wed, 11 July 2007 16:40 Go to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Hello! I have a question.

I always used WTP 1.5.4 and configured my Tomcat Server configuration
with the default settings (i.e.: do not modify Tomcat installation).
This was perfect, and when I started the Tomcat instance from within
Eclipse, the webapps configured in the Tomcat original installation were
not started.

But now, with WTP 2.0, even if I select the option "Use workspace
metadata (does not modify Tomcat installation)", the webapps configured
in the original Tomcat installation are also started whenever I start a
Tomcat instance from Eclipse... Any hint on this? Why does this happen?
How to make Tomcat load just the modules published by Eclipse in the
metadata subfolder?

Thanks in advance.

Mauro.
Re: WTP 2.0 and Tomcat instance [message #196168 is a reply to message #196080] Wed, 11 July 2007 19:37 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I'm not seeing this behavior. If you double-click on the Tomcat server
in the Servers view and switch to the Modules tab, to you see the
"standard" webapps listed? If so, you should be able to use this editor
to remove them.

There isn't enough information to say how this might have come about.
Do you know if the server.xml in the Tomcat installation is still pretty
close to its original installed state when the WTP 2.0 Tomcat server was
created? With the "Use workspace metadata" option selected, my only
guess at this point for the cause is something unusual in the server.xml.

Cheers,
Larry

Mauro Molinari wrote:
> Hello! I have a question.
>
> I always used WTP 1.5.4 and configured my Tomcat Server configuration
> with the default settings (i.e.: do not modify Tomcat installation).
> This was perfect, and when I started the Tomcat instance from within
> Eclipse, the webapps configured in the Tomcat original installation were
> not started.
>
> But now, with WTP 2.0, even if I select the option "Use workspace
> metadata (does not modify Tomcat installation)", the webapps configured
> in the original Tomcat installation are also started whenever I start a
> Tomcat instance from Eclipse... Any hint on this? Why does this happen?
> How to make Tomcat load just the modules published by Eclipse in the
> metadata subfolder?
>
> Thanks in advance.
>
> Mauro.
Re: WTP 2.0 and Tomcat instance [message #196245 is a reply to message #196168] Thu, 12 July 2007 07:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Larry Isaacs ha scritto:
> I'm not seeing this behavior. If you double-click on the Tomcat server
> in the Servers view and switch to the Modules tab, to you see the
> "standard" webapps listed? If so, you should be able to use this editor
> to remove them.
>
> There isn't enough information to say how this might have come about. Do
> you know if the server.xml in the Tomcat installation is still pretty
> close to its original installed state when the WTP 2.0 Tomcat server was
> created? With the "Use workspace metadata" option selected, my only
> guess at this point for the cause is something unusual in the server.xml.
>
> Cheers,
> Larry

Hi Larry, thanks for your support!

First of all: when I switch to Modules tab in the Servers view, I only
see the webapps corresponding to my projects in Eclipse: I do not see
the "standard" webapps listed there.

Regarding server.xml, I notice that the copy in Eclipse is almost
identical to that on the standard Tomcat installation. The only two
differences are:
- in the "standard" server.xml, I added useBodyEncodingForUri="true"
parameter in <Connector>, while WTP removed it in the Eclipse copy
- in the Eclipse copy there are <Context> entries for each webapp I have
configured in Eclipse

However, in the Eclipse copy there still is a reference to the
"standard" appBase:
<Host appBase="c:/wwwroot-webapps" autoDeploy="true" ...>

(please note: I'm not using the default "<Tomcat installation
directory>\webapps" to store the "standard" webapps: I'm using this
path, c:\wwwroot-webapps; maybe is this the problem?)

Comparing with another Server configuration created by WTP 1.5.4 into
another workspace (still used with Eclipse 3.2.2), I notice that the
corresponding server.xml has a different <Host> content:

<Host appBase="webapps" autoDeploy="true" ...>

May be this the cause of the issue? Do I have to change
appBase="c:/wwwroot-webapps" into appBase="webapps" or into
appBase="wtpwebapps" in server.xml created by WTP 2.0?
(Please note: "Deploy path" is set to wtpwebapps in Server configuration)

Why does WTP 2.0 behave differently from WTP 1.5.4? Should I file a bug
for this?

Thanks again for your precious help!

Mauro.
Re: WTP 2.0 and Tomcat instance [message #196360 is a reply to message #196245] Thu, 12 July 2007 14:08 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Mauro Molinari wrote:
> Larry Isaacs ha scritto:
>> I'm not seeing this behavior. If you double-click on the Tomcat
>> server in the Servers view and switch to the Modules tab, to you see
>> the "standard" webapps listed? If so, you should be able to use this
>> editor to remove them.
>>
>> There isn't enough information to say how this might have come about.
>> Do you know if the server.xml in the Tomcat installation is still
>> pretty close to its original installed state when the WTP 2.0 Tomcat
>> server was created? With the "Use workspace metadata" option
>> selected, my only guess at this point for the cause is something
>> unusual in the server.xml.
>>
>> Cheers,
>> Larry
>
> Hi Larry, thanks for your support!
>
> First of all: when I switch to Modules tab in the Servers view, I only
> see the webapps corresponding to my projects in Eclipse: I do not see
> the "standard" webapps listed there.
>
> Regarding server.xml, I notice that the copy in Eclipse is almost
> identical to that on the standard Tomcat installation. The only two
> differences are:
> - in the "standard" server.xml, I added useBodyEncodingForUri="true"
> parameter in <Connector>, while WTP removed it in the Eclipse copy
> - in the Eclipse copy there are <Context> entries for each webapp I have
> configured in Eclipse
>
> However, in the Eclipse copy there still is a reference to the
> "standard" appBase:
> <Host appBase="c:/wwwroot-webapps" autoDeploy="true" ...>
>
> (please note: I'm not using the default "<Tomcat installation
> directory>\webapps" to store the "standard" webapps: I'm using this
> path, c:\wwwroot-webapps; maybe is this the problem?)
>
> Comparing with another Server configuration created by WTP 1.5.4 into
> another workspace (still used with Eclipse 3.2.2), I notice that the
> corresponding server.xml has a different <Host> content:
>
> <Host appBase="webapps" autoDeploy="true" ...>
>
> May be this the cause of the issue? Do I have to change
> appBase="c:/wwwroot-webapps" into appBase="webapps" or into
> appBase="wtpwebapps" in server.xml created by WTP 2.0?
> (Please note: "Deploy path" is set to wtpwebapps in Server configuration)

You are correct. To avoid auto-serving the webapps at "c:/www-webapps"
you should set the appBase attribute back to "webapps". This would get
the WTP 2.0 Tomcat server back to "normal" behavior.

>
> Why does WTP 2.0 behave differently from WTP 1.5.4? Should I file a bug
> for this?

They work differently because their server.xmls are different, so this
isn't a bug. When you create the Tomcat server in WTP, the server.xml
found in the Tomcat installation is "imported" into the Servers project
in your workspace along with some other files. Minimal changes are made
during this copy. This means that some user customizations may get
imported which have side effects that may not be desired. Your case is
a good example. I suspect that your WTP 1.5.4 Tomcat server was created
before appBase was customized, so it would have appBase="webapps" and
not show the undesired behavior.

An underlying issue is that "fixes" that could be made to the server.xml
when the Tomcat server is created kind of depend on what options you
plan to choose for the server after it is created. If you are going to
keep the "Use workspace metadata" option, then appBase should be reset
to "webapps" if it's not set that way already. If you are going to
select the "Use Tomcat installation" option, then the current appBase
value should be kept so the first publish doesn't impose an appBase
change in the configuration of the Tomcat installation.

>
> Thanks again for your precious help!
>
> Mauro.
Re: WTP 2.0 and Tomcat instance [message #196400 is a reply to message #196360] Thu, 12 July 2007 15:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Larry Isaacs ha scritto:
> You are correct. To avoid auto-serving the webapps at "c:/www-webapps"
> you should set the appBase attribute back to "webapps". This would get
> the WTP 2.0 Tomcat server back to "normal" behavior.

Thank you Larry, you've been very clear.

> They work differently because their server.xmls are different, so this
> isn't a bug. When you create the Tomcat server in WTP, the server.xml
> found in the Tomcat installation is "imported" into the Servers project
> in your workspace along with some other files. Minimal changes are made
> during this copy. This means that some user customizations may get
> imported which have side effects that may not be desired. Your case is
> a good example. I suspect that your WTP 1.5.4 Tomcat server was created
> before appBase was customized, so it would have appBase="webapps" and
> not show the undesired behavior.

Maybe it was creted with WTP 1.5 instead of 1.5.4, but I can state for
sure that the customization of appBase in the original installation was
already present when the server configuration was created in Eclipse.

> An underlying issue is that "fixes" that could be made to the server.xml
> when the Tomcat server is created kind of depend on what options you
> plan to choose for the server after it is created. If you are going to
> keep the "Use workspace metadata" option, then appBase should be reset
> to "webapps" if it's not set that way already. If you are going to
> select the "Use Tomcat installation" option, then the current appBase
> value should be kept so the first publish doesn't impose an appBase
> change in the configuration of the Tomcat installation.

I see. So, do you suggest to insert an "enhancement" request in WTP
bugzilla for this?

Thanks again!!
Mauro.
Re: WTP 2.0 and Tomcat instance [message #196407 is a reply to message #196400] Thu, 12 July 2007 16:16 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Mauro Molinari wrote:
> Larry Isaacs ha scritto:
>> You are correct. To avoid auto-serving the webapps at
>> "c:/www-webapps" you should set the appBase attribute back to
>> "webapps". This would get the WTP 2.0 Tomcat server back to "normal"
>> behavior.
>
> Thank you Larry, you've been very clear.
>
>> They work differently because their server.xmls are different, so this
>> isn't a bug. When you create the Tomcat server in WTP, the server.xml
>> found in the Tomcat installation is "imported" into the Servers
>> project in your workspace along with some other files. Minimal changes
>> are made during this copy. This means that some user customizations
>> may get imported which have side effects that may not be desired.
>> Your case is a good example. I suspect that your WTP 1.5.4 Tomcat
>> server was created before appBase was customized, so it would have
>> appBase="webapps" and not show the undesired behavior.
>
> Maybe it was creted with WTP 1.5 instead of 1.5.4, but I can state for
> sure that the customization of appBase in the original installation was
> already present when the server configuration was created in Eclipse.

Nothing in the WTP Tomcat support has ever modified the appBase
attribute. However, in WTP 1.5.x, webapps are unconditionally published
to the "webapps" folder under the catalina.base location. With the
customized appBase settings, the Eclipse projects would not have been
served, just those under appBase. Perhaps the appBase setting was fixed
manually a while ago since it's been working since WTP 1.5.

>
>> An underlying issue is that "fixes" that could be made to the
>> server.xml when the Tomcat server is created kind of depend on what
>> options you plan to choose for the server after it is created. If you
>> are going to keep the "Use workspace metadata" option, then appBase
>> should be reset to "webapps" if it's not set that way already. If you
>> are going to select the "Use Tomcat installation" option, then the
>> current appBase value should be kept so the first publish doesn't
>> impose an appBase change in the configuration of the Tomcat installation.
>
> I see. So, do you suggest to insert an "enhancement" request in WTP
> bugzilla for this?

Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=118705 already
revolves around the appBase attribute. Feel free to add a comment or
proposal there.


>
> Thanks again!!
> Mauro.
Previous Topic:Servlet Faces SErvlet is not available
Next Topic:Eclipse 3.3, can't recognize encoding of WEB-INF/web.xml
Goto Forum:
  


Current Time: Fri Apr 19 19:51:56 GMT 2024

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

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

Back to the top