Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Serving Web Content out of Root
Serving Web Content out of Root [message #174182] Wed, 12 July 2006 18:10 Go to next message
Eclipse UserFriend
Originally posted by: derek.k.richardson.gmail.com

When I create a new Dynamic Web Project, on the third screen of the wizard
it asks for a Content Directory. If I enter a directory here, it creates
it in my project. If I blank it out, it says "Enter Source Folder." If I
enter a forward-slash, it gives me an error that I must specify the
projectname. If I enter "/projectname" it creates a directory called
projectname in my project called projectname. I want to have my web
content start at the root of the project, rather than begin in a separate
folder under the root. Is this possible?

This would not be an issue if I did not have an existing web application
with this structure that I was trying to turn into a WTP project.

It occurs to me that, since I can't find a way to change the Content
Directory on any of the property pages after I create the project, that I
may be able to simply delete the directory and ahve everything work
magically. I'm going to try this now, but, even if it seems to work for
me, I'd appreciate it if someone who knows the source code can tell me
that this is a reasonable solution.

Thanks.
Re: Serving Web Content out of Root [message #174212 is a reply to message #174182] Wed, 12 July 2006 23:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: derek.k.richardson.gmail.com

I couldn't simply delete the Content Directory because that's where
Eclipse WTP thinks the web.xml is. It's not seeing my web.xml in
<project>/WEB-INF/web.xml. Actually, I *could* delete it, but then I have
no deployment descriptor and I can't figure out how to point it at the
right one that is remaining. So, when I deploy, I end up getting:

19:15:58,015 INFO [ContextConfig] Missing application web.xml, using
defaults only

Adn, when I navigate to my context, I just get an empty directory listing

Advice?

Derek Richardson wrote:

> ....I want to have my web
> content start at the root of the project, rather than begin in a separate
> folder under the root. Is this possible?

> This would not be an issue if I did not have an existing web application
> with this structure that I was trying to turn into a WTP project.

> It occurs to me that, since I can't find a way to change the Content
> Directory on any of the property pages after I create the project, that I
> may be able to simply delete the directory and ahve everything work
> magically. I'm going to try this now, but, even if it seems to work for
> me, I'd appreciate it if someone who knows the source code can tell me
> that this is a reasonable solution.

> Thanks.
Re: Serving Web Content out of Root [message #174354 is a reply to message #174212] Thu, 13 July 2006 13:11 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
The Java Development Tools (JDT) supports having the Java source and
build folder be in the root of your project. To make this possible,
filtering is implemented so source can be distinguished from the build
artifacts. I'm not all that familiar with the relevant portions of Web
Tools code, but I don't believe such filtering is available for the
resources destined to be web content. If the Content Directory was the
root of your project, it is likely that at least some, if not all of the
rest of your project would be unintentionally seen as web content. I
believe for the time being, the "filtering agent" to distinguish web
content from the rest of your project is the Content Directory folder.
I doubt you will be able to get things to work properly without it.

Cheers,
Larry

Derek Richardson wrote:
> I couldn't simply delete the Content Directory because that's where
> Eclipse WTP thinks the web.xml is. It's not seeing my web.xml in
> <project>/WEB-INF/web.xml. Actually, I *could* delete it, but then I
> have no deployment descriptor and I can't figure out how to point it at
> the right one that is remaining. So, when I deploy, I end up getting:
>
> 19:15:58,015 INFO [ContextConfig] Missing application web.xml, using
> defaults only
>
> Adn, when I navigate to my context, I just get an empty directory listing
>
> Advice?
>
> Derek Richardson wrote:
>
>> ....I want to have my web content start at the root of the project,
>> rather than begin in a separate folder under the root. Is this possible?
>
>> This would not be an issue if I did not have an existing web
>> application with this structure that I was trying to turn into a WTP
>> project.
>
>> It occurs to me that, since I can't find a way to change the Content
>> Directory on any of the property pages after I create the project,
>> that I may be able to simply delete the directory and ahve everything
>> work magically. I'm going to try this now, but, even if it seems to
>> work for me, I'd appreciate it if someone who knows the source code
>> can tell me that this is a reasonable solution.
>
>> Thanks.
>
>
Previous Topic:Creating Web Service in Eclipse with Axis and Tomcat
Next Topic:Convert Existing Codes to Web Service
Goto Forum:
  


Current Time: Sat Nov 22 00:25:16 GMT 2014

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

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