Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Changing the location of WebContent
Changing the location of WebContent [message #191772] Wed, 25 April 2007 17:03 Go to next message
Eclipse User
Originally posted by: chris.lieb.gmail.com

I am trying to change the location of the WebContent folder the Eclipse
references so that I can get the project to correctly read the folder
hierarchy that Maven2 generates. In Maven, the source files for the web
pages (normally contained in the WebContent folder; classes folder
excluded) are stored at src/main/webapp and the compiled classes at
target/classes. Basically, the final directory structure would be:

project/
src/
main/
java/
[*.java source files]
webapp/
[*.html, *.jsp[x], *.tld, etc]
test/
java/
[*.java test source files]
target/
classes/
[compiled class files]
project.war

instead of:

project/
JavaSource/
[*.java source files]
WebContent/
WEB-INF/
classes/
[compiled class files]
[*.html, *.jsp[x], *.tld, etc]

I can't seem to find any settings to accomplish this in the project
Properties dialog box nor in any of the generated project config files.

BTW: I had no problem changing the Java source folders or the output
folder, just the WebContent folder.

Thanks in advance,

Chris Lieb
Re: Changing the location of WebContent [message #191790 is a reply to message #191772] Wed, 25 April 2007 19:32 Go to previous messageGo to next message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
The relevant setting is stored in the following element in the
..settings/org.eclipse.wst.common.component file:
<wb-resource deploy-path="/" source-path="/WebContent"/>

(this element maps the contents of the "WebContent" folder into the root of
the published web module)

Although no UI support for changing this exists, I just released changes
(will be in this week's WTP 2.0 RC0 I-build) that will automatically update
this element when the user renames or moves the WebContent folder (this
actually applies to any non-Java src folder that is mapped in the
org.eclipse.wst.common.component file; such support already exists for
changes to mapped Java src folders)

-Rob

"Chris Lieb" <chris.lieb@gmail.com> wrote in message
news:f0o1la$vtb$1@build.eclipse.org...
>I am trying to change the location of the WebContent folder the Eclipse
> references so that I can get the project to correctly read the folder
> hierarchy that Maven2 generates. In Maven, the source files for the web
> pages (normally contained in the WebContent folder; classes folder
> excluded) are stored at src/main/webapp and the compiled classes at
> target/classes. Basically, the final directory structure would be:
>
> project/
> src/
> main/
> java/
> [*.java source files]
> webapp/
> [*.html, *.jsp[x], *.tld, etc]
> test/
> java/
> [*.java test source files]
> target/
> classes/
> [compiled class files]
> project.war
>
> instead of:
>
> project/
> JavaSource/
> [*.java source files]
> WebContent/
> WEB-INF/
> classes/
> [compiled class files]
> [*.html, *.jsp[x], *.tld, etc]
>
> I can't seem to find any settings to accomplish this in the project
> Properties dialog box nor in any of the generated project config files.
>
> BTW: I had no problem changing the Java source folders or the output
> folder, just the WebContent folder.
>
> Thanks in advance,
>
> Chris Lieb
Re: Changing the location of WebContent [message #191805 is a reply to message #191790] Wed, 25 April 2007 20:49 Go to previous message
Eclipse User
Originally posted by: chris.lieb.gmail.com

I had tried changing that setting, but it didn't seem to have any
effect. It still tried creating a new WebContent folder every time I
opened the IDE. Maybe it's just one of those IBM "contributions" that
they make to Rational App Developer before releasing it for sale.

Thanks,
Chris Lieb

Rob Frost wrote:
> The relevant setting is stored in the following element in the
> .settings/org.eclipse.wst.common.component file:
> <wb-resource deploy-path="/" source-path="/WebContent"/>
>
> (this element maps the contents of the "WebContent" folder into the root of
> the published web module)
>
> Although no UI support for changing this exists, I just released changes
> (will be in this week's WTP 2.0 RC0 I-build) that will automatically update
> this element when the user renames or moves the WebContent folder (this
> actually applies to any non-Java src folder that is mapped in the
> org.eclipse.wst.common.component file; such support already exists for
> changes to mapped Java src folders)
>
> -Rob
>
> "Chris Lieb" <chris.lieb@gmail.com> wrote in message
> news:f0o1la$vtb$1@build.eclipse.org...
>> I am trying to change the location of the WebContent folder the Eclipse
>> references so that I can get the project to correctly read the folder
>> hierarchy that Maven2 generates. In Maven, the source files for the web
>> pages (normally contained in the WebContent folder; classes folder
>> excluded) are stored at src/main/webapp and the compiled classes at
>> target/classes. Basically, the final directory structure would be:
>>
>> project/
>> src/
>> main/
>> java/
>> [*.java source files]
>> webapp/
>> [*.html, *.jsp[x], *.tld, etc]
>> test/
>> java/
>> [*.java test source files]
>> target/
>> classes/
>> [compiled class files]
>> project.war
>>
>> instead of:
>>
>> project/
>> JavaSource/
>> [*.java source files]
>> WebContent/
>> WEB-INF/
>> classes/
>> [compiled class files]
>> [*.html, *.jsp[x], *.tld, etc]
>>
>> I can't seem to find any settings to accomplish this in the project
>> Properties dialog box nor in any of the generated project config files.
>>
>> BTW: I had no problem changing the Java source folders or the output
>> folder, just the WebContent folder.
>>
>> Thanks in advance,
>>
>> Chris Lieb
>
>
Previous Topic:Re: problems at pattern facet creation/validation
Next Topic:geronimo-web.xml
Goto Forum:
  


Current Time: Mon Sep 22 18:36:40 GMT 2014

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

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