Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WTP Question
WTP Question [message #152345] Wed, 14 December 2005 20:21 Go to next message
Fabio Mancinelli is currently offline Fabio MancinelliFriend
Messages: 16
Registered: July 2009
Junior Member
Hello all.

Maybe this is a silly question but I cannot figure out where, in the IDE
menus and dialogs, it is possible to change the information that is
stored in the .wtmodules of a Dynamic Web Project. In particular, the
context-root property of the module.

Moreover, in the .wtpmodules file there are also several wb-resource
tags with deploy-path/source-path attributes which can be useful when
you want to maintain a non-standard structure of your project and deploy
the files in the right places. Again, I haven't found any place in the
IDE where this information could be modified.

Any hint?

Thank you,
Fabio
Re: WTP Question [message #152368 is a reply to message #152345] Wed, 14 December 2005 22:52 Go to previous messageGo to next message
Jonathan Barnes is currently offline Jonathan BarnesFriend
Messages: 10
Registered: July 2009
Junior Member
As far as I know the place to modify them is in the .wtpmodules file itself. I
a haven't seen any UI to manage that info, and don't think it exists. I have,
however modified that file without incident.

Apparently in the 1.0 versions of WTP the .wtpmodules file has been replaced by
other config files in the .settings folder. I don't know the format of these
new files or where any of that info exists, but would not recommend spending too
much time getting to understand the .wtpmodules file as it will soon disappear.

Fabio Mancinelli wrote:
> Hello all.
>
> Maybe this is a silly question but I cannot figure out where, in the IDE
> menus and dialogs, it is possible to change the information that is
> stored in the .wtmodules of a Dynamic Web Project. In particular, the
> context-root property of the module.
>
> Moreover, in the .wtpmodules file there are also several wb-resource
> tags with deploy-path/source-path attributes which can be useful when
> you want to maintain a non-standard structure of your project and deploy
> the files in the right places. Again, I haven't found any place in the
> IDE where this information could be modified.
>
> Any hint?
>
> Thank you,
> Fabio
Re: WTP Question [message #152424 is a reply to message #152368] Thu, 15 December 2005 13:59 Go to previous messageGo to next message
Fabio Mancinelli is currently offline Fabio MancinelliFriend
Messages: 16
Registered: July 2009
Junior Member
Jonathan Barnes wrote:
> As far as I know the place to modify them is in the .wtpmodules file
> itself. I a haven't seen any UI to manage that info, and don't think it
> exists. I have, however modified that file without incident.
>
> Apparently in the 1.0 versions of WTP the .wtpmodules file has been
> replaced by other config files in the .settings folder. I don't know
> the format of these new files or where any of that info exists, but
> would not recommend spending too much time getting to understand the
> .wtpmodules file as it will soon disappear.
>

I have installed WTP 1.0RC4 and, as you said, the .wtpmodules file has
been moved and renamed in the .settings folder. In the .component file I
can find all the information that was present in the .wtpmodules (i.e.,
the application context-root and various deployment paths). Still there
is no way to alter this information from the IDE.

It seems *really* strange to me that a so trivial feature like changing
the context-root after project creation has not been implemented through
an IDE accessible way.

Am I missing something?

Bye,
Fabio
Re: WTP Question [message #152441 is a reply to message #152424] Thu, 15 December 2005 14:17 Go to previous messageGo to next message
Janny Buh is currently offline Janny BuhFriend
Messages: 9
Registered: July 2009
Junior Member
I'm also experimenting wtp 1.0rc4 and I've found no other way to modify
that parameters except for manually edit the .component file.
I've also noticed many inconsistencies between .component file setting and
generated wtp artifacts (see my post "WTP 1.0RC4 ear deployment error")...
Changing webapp's context root (was Re: WTP Question) [message #152450 is a reply to message #152424] Thu, 15 December 2005 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

Fabio Mancinelli wrote:
> Jonathan Barnes wrote:
>> As far as I know the place to modify them is in the .wtpmodules file
>> itself. I a haven't seen any UI to manage that info, and don't think
>> it exists. I have, however modified that file without incident.
>>
>> Apparently in the 1.0 versions of WTP the .wtpmodules file has been
>> replaced by other config files in the .settings folder. I don't know
>> the format of these new files or where any of that info exists, but
>> would not recommend spending too much time getting to understand the
>> .wtpmodules file as it will soon disappear.
>>
>
> I have installed WTP 1.0RC4 and, as you said, the .wtpmodules file has
> been moved and renamed in the .settings folder. In the .component file I
> can find all the information that was present in the .wtpmodules (i.e.,
> the application context-root and various deployment paths). Still there
> is no way to alter this information from the IDE.
>
> It seems *really* strange to me that a so trivial feature like changing
> the context-root after project creation has not been implemented through
> an IDE accessible way.

Strange indeed. Is there a bug filed about this?

Daniel Serodio
Re: WTP Question [message #152458 is a reply to message #152441] Thu, 15 December 2005 14:45 Go to previous messageGo to next message
Fabio Mancinelli is currently offline Fabio MancinelliFriend
Messages: 16
Registered: July 2009
Junior Member
Janny wrote:
> I'm also experimenting wtp 1.0rc4 and I've found no other way to modify
> that parameters except for manually edit the .component file.
> I've also noticed many inconsistencies between .component file setting
> and generated wtp artifacts (see my post "WTP 1.0RC4 ear deployment
> error")...
>
Maybe I am missing something, but even modifying the .component file
doesn't give any result. I created a project called Test and I gave him
the /test context root.Then I modified the .component in order to have a
/foo context root. The Test project gets always deployed in /test.
(After closing and reopening the project now it says even that there are
no runnable artifacts when I click on the Test web-icon and select run
on server)

I noticed also that in the Servers tab when the server is running, it is
possible to change and reconfigure deployed applications. I tried to
change the context root there. No way. If I change the context root of a
deployed application this is ignored (requests to the new context root
fail). If I remove and I re-add the application by specifying a new
context root in the dialog, it still uses the old one.

I gave up.
Re: WTP Question [message #152475 is a reply to message #152458] Thu, 15 December 2005 15:29 Go to previous messageGo to next message
Janny Buh is currently offline Janny BuhFriend
Messages: 9
Registered: July 2009
Junior Member
Fabio Mancinelli wrote:
> Maybe I am missing something, but even modifying the .component file
> doesn't give any result. I created a project called Test and I gave him
> the /test context root.Then I modified the .component in order to have a
> /foo context root. The Test project gets always deployed in /test.
> (After closing and reopening the project now it says even that there are
> no runnable artifacts when I click on the Test web-icon and select run
> on server)

It seems like xdoclet is not regenerating deployment files. What runtime
are you using? Try remove all xml deployment files in order to force
xdoclet to regenerate them.
I'm using jboss runtime (i've downloaded the wtp plugin from this
newsgroup) and i've tested many settings in .component and the
context-root is correctly updated in my jboss-web.xml (web.xml has no
<context-param>, so it is set in jboss-web.xml file).
I've noticed that the generated war artifact is always named as the
eclipse project independently from the value of the deploy-name attribute
in .component, so if no context-root is set in any deployment file I
suppose that this parameter is derived from the artifact name (which is
always the same!).
Re: WTP Question [message #152491 is a reply to message #152475] Thu, 15 December 2005 16:38 Go to previous messageGo to next message
Fabio Mancinelli is currently offline Fabio MancinelliFriend
Messages: 16
Registered: July 2009
Junior Member
Janny wrote:

> It seems like xdoclet is not regenerating deployment files. What runtime
> are you using? Try remove all xml deployment files in order to force
> xdoclet to regenerate them.
>
I am using a plain Tomcat 5.5 server.

> independently from the value of the deploy-name attribute in .component,
> so if no context-root is set in any deployment file I suppose that this
> parameter is derived from the artifact name (which is always the same!).
>
I don't know. But this is a weird behavior.
Re: WTP Question [message #152515 is a reply to message #152424] Thu, 15 December 2005 18:33 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Fabio Mancinelli wrote:
> It seems *really* strange to me that a so trivial feature like changing
> the context-root after project creation has not been implemented through
> an IDE accessible way.
>
> Am I missing something?

Just bug report 117145:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=117145

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: WTP Question [message #152554 is a reply to message #152458] Thu, 15 December 2005 19:09 Go to previous messageGo to next message
Jonathan Barnes is currently offline Jonathan BarnesFriend
Messages: 10
Registered: July 2009
Junior Member
Fabio Mancinelli wrote:
> Janny wrote:
>
>> I'm also experimenting wtp 1.0rc4 and I've found no other way to
>> modify that parameters except for manually edit the .component file.
>> I've also noticed many inconsistencies between .component file setting
>> and generated wtp artifacts (see my post "WTP 1.0RC4 ear deployment
>> error")...
>>
> Maybe I am missing something, but even modifying the .component file
> doesn't give any result. I created a project called Test and I gave him
> the /test context root.Then I modified the .component in order to have a
> /foo context root. The Test project gets always deployed in /test.
> (After closing and reopening the project now it says even that there are
> no runnable artifacts when I click on the Test web-icon and select run
> on server)
>
> I noticed also that in the Servers tab when the server is running, it is
> possible to change and reconfigure deployed applications. I tried to
> change the context root there. No way. If I change the context root of a
> deployed application this is ignored (requests to the new context root
> fail). If I remove and I re-add the application by specifying a new
> context root in the dialog, it still uses the old one.
>
> I gave up.

Well I know things are different in the 1.0* releases, but in the 0.7* release,
I would do the following to have things like the context root change.
1: make sure the app server was stopped (as I don't know how it would react to
these changes)
2: change the context root in the .wtpmodules file
3: delete the /.deployables directory (This would immediately get rebuilt by
eclipse)
4: rebuild project "project -> clean" (without this I don't believe the class
files would get build into the .deployables)

From what I am hearing the .deployables dir has been moved into the
$WORKSPACE/.metadata folder somewhere in the 1.0* releases and I don't know if
the same steps will work, but I don't see why they would not.

I know this is kind of a crap process to have to follow, but how often does one
need to change their context root or project structure.

-Jonathan
Re: WTP Question [message #152562 is a reply to message #152554] Thu, 15 December 2005 19:52 Go to previous message
Darryl Miles is currently offline Darryl MilesFriend
Messages: 123
Registered: July 2009
Senior Member
Jonathan Barnes wrote:
> From what I am hearing the .deployables dir has been moved into the
> $WORKSPACE/.metadata folder somewhere in the 1.0* releases and I don't
> know if the same steps will work, but I don't see why they would not.

To clarify, it has not been moved, there is no longer an equivalent
"publish staging area" between the workspace and the runtime. The
publih now takes items directly from the workspace and emits them within
the runtime.

What is in the .metadata directory is a localized copy of a runtime
directory hierachy tomcat can work out of. There is also a tick box
option to work out of the distribution path you setup when creating the
tomcat runtime.

Using the .deployables directory was only ever implementation detail,
did any documentation say it was there to allow you to build on top of
it ? Or did you just stumble upon it and start making use of it ?

So as warning in your future choices whatever you may find in the
..metadata directory you really should accept that at anytime it is
subject to change without notice.


> I know this is kind of a crap process to have to follow, but how often
> does one need to change their context root or project structure.

They've done a grand job please dont forget the version is not even at
1.0 yet.

Being able to configure the context path for testing sounds a very valid
feature to have, but if there was never a UI to do it, then how were you
using anything but the default value ? I'm pretty sure manually editing
Eclipse configuration files invalidates the warranty :)

So if you were never able to do it in the first place (except through an
unsupported mechanism) its difficult to complain it doesn't work.

Please be real.


Darryl
Previous Topic:JSP validation errors not showing up ?
Next Topic:Pointing a jaas file to a configured server
Goto Forum:
  


Current Time: Fri Mar 29 13:50:29 GMT 2024

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

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

Back to the top