Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Nested WebContent Directory for Dynamic Web Projects
Nested WebContent Directory for Dynamic Web Projects [message #197947] Tue, 07 August 2007 23:25 Go to next message
Eclipse User
Originally posted by: corvino.gmail.com

I want to change the WebContent directory to be three levels deep in my
project workspace when creating a Dynamic Web Project. With WebTools
1.5 I was able to do this when creating the project by entering
src/web/etc for the WebContent directory. After upgrading to WebTools
2.0, I find that I am unable to do this. Eclipse says '/ is an invalid
character in resource name ...'.

I also don't understand why I can't change the location of the
WebContent directory after project creation. I used to be able to
accomplish this by editing XML files in the project .settings directory,
but with WebTools 2.0 I haven't been able to get even this to work. If
the setting is allowed at project creation time, why can't I change it?
And why can't I give it any valid directory name.

Thanks for any help you can offer,

Nathan
Re: Nested WebContent Directory for Dynamic Web Projects [message #198072 is a reply to message #197947] Thu, 09 August 2007 15:25 Go to previous messageGo to next message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
hi Nathan,

See comments below.

-Rob

"Nathan Corvino" <corvino@gmail.com> wrote in message
news:f9av1i$avp$1@build.eclipse.org...
>I want to change the WebContent directory to be three levels deep in my
>project workspace when creating a Dynamic Web Project. With WebTools 1.5 I
>was able to do this when creating the project by entering src/web/etc for
>the WebContent directory. After upgrading to WebTools 2.0, I find that I
>am unable to do this. Eclipse says '/ is an invalid character in resource
>name ...'.

Looks like this is a bug in the Dynamic Web project wizard, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194501

> I also don't understand why I can't change the location of the WebContent
> directory after project creation. I used to be able to accomplish this
> by editing XML files in the project .settings directory, but with WebTools
> 2.0 I haven't been able to get even this to work. If the setting is
> allowed at project creation time, why can't I change it? And why can't I
> give it any valid directory name.

Although you can now simply rename/move the WebContent directory, trying to
map it underneath src is going to be problematic: the "src" directory
(really the compiled output of the src directory, /build/classes by default)
is already mapped to /WEB-INF/classes. The refactoring logic that handles
updating the component file in response to these refactoring ops does not
handle the case where you try to move a non-Java src dir underneath a Java
src dir; even if it did (or if you directly edit the component file
yourself), you would end up with your WebContent contents duplicated in the
published/exported WAR (under both the root and WEB-INF/classes)

>
> Thanks for any help you can offer,
>
> Nathan
Re: Nested WebContent Directory for Dynamic Web Projects [message #198491 is a reply to message #198072] Sat, 18 August 2007 17:44 Go to previous messageGo to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
I very much suspect that the original post related to a Maven or Maven like
layout - "src" does not have to be the location of Java source code, even
though WTP seems to think that is a good idea. It seems like a pretty bad
regression to me.

"Rob Frost" <rfrost@bea.com> wrote in message
news:f9fblj$sl0$1@build.eclipse.org...
> Although you can now simply rename/move the WebContent directory, trying
> to map it underneath src is going to be problematic: the "src" directory
> (really the compiled output of the src directory, /build/classes by
> default) is already mapped to /WEB-INF/classes. The refactoring logic that
> handles updating the component file in response to these refactoring ops
> does not handle the case where you try to move a non-Java src dir
> underneath a Java src dir; even if it did (or if you directly edit the
> component file yourself), you would end up with your WebContent contents
> duplicated in the published/exported WAR (under both the root and
> WEB-INF/classes)
Re: Nested WebContent Directory for Dynamic Web Projects [message #198531 is a reply to message #198491] Mon, 20 August 2007 14:03 Go to previous message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
The inability to specify that structure in the new project wizard is
certainly a regression (and I believe it has been fixed in 2.0.1)

If "src" in this case is not in fact a Java src folder, then the support for
refactoring the WebContent folder to this location should work. If it does
not, please open a bugzilla.

-Rob

"Dave Syer" <david_syer@hotmail.com> wrote in message
news:fa7b6e$une$1@build.eclipse.org...
>I very much suspect that the original post related to a Maven or Maven like
>layout - "src" does not have to be the location of Java source code, even
>though WTP seems to think that is a good idea. It seems like a pretty bad
>regression to me.
>
> "Rob Frost" <rfrost@bea.com> wrote in message
> news:f9fblj$sl0$1@build.eclipse.org...
>> Although you can now simply rename/move the WebContent directory, trying
>> to map it underneath src is going to be problematic: the "src" directory
>> (really the compiled output of the src directory, /build/classes by
>> default) is already mapped to /WEB-INF/classes. The refactoring logic
>> that handles updating the component file in response to these refactoring
>> ops does not handle the case where you try to move a non-Java src dir
>> underneath a Java src dir; even if it did (or if you directly edit the
>> component file yourself), you would end up with your WebContent contents
>> duplicated in the published/exported WAR (under both the root and
>> WEB-INF/classes)
>
>
Previous Topic:how does wtp add external classes and project to tomcat runtimeclasspath?
Next Topic:Possible bug in WebService Explorer?
Goto Forum:
  


Current Time: Fri Oct 31 13:05:45 GMT 2014

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

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