Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSP from multiple directories
JSP from multiple directories [message #231427] Sun, 17 May 2009 05:19 Go to next message
breako  is currently offline breako
Messages: 57
Registered: July 2009
Member
Hi,

I wish to have a web project which I will be able to configure so that
JSPs are picked up from two completly different directories. One will be
in the standard J2EE place, but the other one will be an entirely
different directory.

Is this possible?

Note: the reason for this is that I have a base project and then some
customisation development which I want to keep completly separate during
development time. It just makes things a lot cleaner.

Any tips / help greatly appreciated.

PS
Thanks for help on other posts.
Re: JSP from multiple directories [message #231497 is a reply to message #231427] Mon, 18 May 2009 06:46 Go to previous messageGo to next message
Eclipse User
Originally posted by: mauro.molinari.cardinis.com

breako ha scritto:
> Hi,
>
> I wish to have a web project which I will be able to configure so that
> JSPs are picked up from two completly different directories. One will
> be in the standard J2EE place, but the other one will be an entirely
> different directory.
>
> Is this possible?
>
> Note: the reason for this is that I have a base project and then some
> customisation development which I want to keep completly separate during
> development time. It just makes things a lot cleaner.
>
> Any tips / help greatly appreciated.

It is supported, but there is no UI that allows to do that.

You have to change the hidden file org.eclipse.wst.common.component (use
Ctrl+Shift+R and type its name) in your project/.settings folder. Add as
many <wb-resource> entries with deploy-path="/" as you need. Example:

<wb-resource deploy-path="/" source-path="/folder-with-JSPs-1"/>
<wb-resource deploy-path="/" source-path="/folder-with-JSPs-2"/>
<wb-resource deploy-path="/" source-path="/folder-with-JSPs-3"/>

Save and that's it.

I suggest to enlist the folder containing your web.xml as the first one.

Then, please add your vote to one or both of the following enhancement
requests:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=133359
https://bugs.eclipse.org/bugs/show_bug.cgi?id=107039

Hope this helps.

Mauro.
Re: JSP from multiple directories [message #231510 is a reply to message #231497] Mon, 18 May 2009 09:01 Go to previous messageGo to next message
breako  is currently offline breako
Messages: 57
Registered: July 2009
Member
That's sounds great. Thanks a million for this. I'll try this now. Well
done.
Re: JSP from multiple directories [message #231543 is a reply to message #231497] Mon, 18 May 2009 12:38 Go to previous messageGo to next message
breako  is currently offline breako
Messages: 57
Registered: July 2009
Member
Mauro Molinari wrote:
> It is supported, but there is no UI that allows to do that.

> You have to change the hidden file org.eclipse.wst.common.component (use
> Ctrl+Shift+R and type its name) in your project/.settings folder. Add as
> many <wb-resource> entries with deploy-path="/" as you need. Example:

> <wb-resource deploy-path="/" source-path="/folder-with-JSPs-1"/>
> <wb-resource deploy-path="/" source-path="/folder-with-JSPs-2"/>
> <wb-resource deploy-path="/" source-path="/folder-with-JSPs-3"/>

Thanks Mauro. That all worked. Well done. I'm wondering do you know of any
smart way I could write a script to this.

Ideally I like to kick off an ant target which do a lot of eclipse
configuration, including the above.

Any ideas?
Re: JSP from multiple directories [message #231580 is a reply to message #231543] Tue, 19 May 2009 09:25 Go to previous messageGo to next message
Eclipse User
Originally posted by: mauro.molinari.cardinis.com

breako ha scritto:
> Thanks Mauro. That all worked. Well done. I'm wondering do you know of
> any smart way I could write a script to this.
>
> Ideally I like to kick off an ant target which do a lot of eclipse
> configuration, including the above.
>
> Any ideas?

I think your Ant task should edit that file by adding the necessary
<wb-resource> elements. However, I can't suggest you anything more
specific (I never tried to accomplish that).

Mauro.
Re: JSP from multiple directories [message #517119 is a reply to message #231580] Fri, 26 February 2010 05:49 Go to previous messageGo to next message
breako  is currently offline breako
Messages: 57
Registered: July 2009
Member
Hi Mauro (or anyone else),
I am using this approach for multiple JSPs WebContent paths. It's good.

However, I get an error when a JSP in one WebContent path needs to reference a taglib in another.

There is no problem in deployment, but in the development time eclipse will show up a validation error.

Any ideas?

Thanks.
Re: JSP from multiple directories [message #517187 is a reply to message #517119] Fri, 26 February 2010 09:46 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
Registered: July 2009
Senior Member
Do you mean a different path in the same project, or in a different project altogether? Is it a .tld file you're pointing to or referring to a .jar somehow? And with which version of WTP?

---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:persistence.xml editor doesn't work
Next Topic:Server for static web site
Goto Forum:
  


Current Time: Sat Aug 30 10:40:58 EDT 2014

Powered by FUDForum. Page generated in 0.03026 seconds