Multiple (virtual) web app roots

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple (virtual) web app roots

Patrick Lightbody-2
Multiple (virtual) web app roots

Is there any way to hack Jetty in to supporting multiple webapp roots? Not a big deal, but itd be nice to emulate the feature that IDEA provides where webapps can extend other webapps. The basic idea is to overlay the two directory structures:

WebAppX:

/foo.jsp

/bar.jsp

/WEB-INF/web.xml

WebAppY:

/bar.jsp

/baz.jsp

/WEB-INF/web.xml

/WEB-INF/sitemesh.xml

When Y extends Z, you get:

/foo.jsp

/bar.jsp (Y)

/baz.jsp

/WEB-INF/web.xml (Y)

/WEB-INF/sitemesh.xml

I looked at doing this with the WebApplicationContext, but I couldnt quite figure it out.

Patrick

_________________
Patrick Lightbody
Professional Services
Jive Software
[hidden email]
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047

Reply | Threaded
Open this post in threaded view
|

RE: Multiple (virtual) web app roots

Patrick Lightbody-2
Multiple (virtual) web app roots

Looks like this is possible by subclasses WebApplicationContext and overriding getResource(). Greg, is that right?

 

_________________
Patrick Lightbody
Professional Services
Jive Software
[hidden email]
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047


From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrick Lightbody
Sent: Wednesday, August 10, 2005 9:41 AM
To: [hidden email]
Subject: [Jetty-support] Multiple (virtual) web app roots

 

Is there any way to hack Jetty in to supporting multiple webapp roots? Not a big deal, but it’d be nice to emulate the feature that IDEA provides where webapps can “extend” other webapps. The basic idea is to overlay the two directory structures:

WebAppX:

/foo.jsp

/bar.jsp

/WEB-INF/web.xml

WebAppY:

/bar.jsp

/baz.jsp

/WEB-INF/web.xml

/WEB-INF/sitemesh.xml

When Y extends Z, you get:

/foo.jsp

/bar.jsp (Y)

/baz.jsp

/WEB-INF/web.xml (Y)

/WEB-INF/sitemesh.xml

I looked at doing this with the WebApplicationContext, but I couldn’t quite figure it out.

Patrick

_________________
Patrick Lightbody
Professional Services
Jive Software
[hidden email]
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047

Reply | Threaded
Open this post in threaded view
|

Re: Multiple (virtual) web app roots

Greg Wilkins-5
Patrick Lightbody wrote:
> Looks like this is possible by subclasses WebApplicationContext and
> overriding getResource(). Greg, is that right?

It sounds worth a try....  but there may be some other mechanisms that go
directly to getResourceBase.....  so I'm not 100%.

But give it a try and I'll help work around any problems that result.

cheers



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Multiple (virtual) web app roots

Kristian Nordal
In reply to this post by Patrick Lightbody-2

On Aug 11, 2005, at 6:06 PM, Patrick Lightbody wrote:

Looks like this is possible by subclasses WebApplicationContext and overriding getResource(). Greg, is that right?


Hi,

I would like to be able to do much of the same. I want a WEB-INF directory to supersede another, making it possible to edit my templates and JSPs while Jetty is running. 

Webapp (deployed location):
...
WEB-INF/classes/*
WEB-INF/velocity/*
WEB-INF/jsp/*
...

Source location:
WEB-INF/velocity/*
WEB-INF/jsp/*

I start Jetty embedded.
WEB-INF/classes/ must be available from the deployed location, but I need the other directories to be superseded by the ones in the source location.

I guess we need to do it in the same way. Let me know if you manages it.

--
Cheers,
Kristian

 

_________________
Patrick Lightbody
Professional Services
Jive Software
[hidden email]
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047


From: [hidden email] [[hidden email]] On Behalf Of Patrick Lightbody
Sent: Wednesday, August 10, 2005 9:41 AM
To: [hidden email]
Subject: [Jetty-support] Multiple (virtual) web app roots

 

Is there any way to hack Jetty in to supporting multiple webapp roots? Not a big deal, but it’d be nice to emulate the feature that IDEA provides where webapps can“extend” other webapps. The basic idea is to overlay the two directory structures:

WebAppX:

/foo.jsp

/bar.jsp

/WEB-INF/web.xml

WebAppY:

/bar.jsp

/baz.jsp

/WEB-INF/web.xml

/WEB-INF/sitemesh.xml

When Y extends Z, you get:

/foo.jsp

/bar.jsp (Y)

/baz.jsp

/WEB-INF/web.xml (Y)

/WEB-INF/sitemesh.xml

I looked at doing this with the WebApplicationContext, but I couldn’t quite figure it out.

Patrick

_________________
Patrick Lightbody
Professional Services
Jive Software
[hidden email]
www.jivesoftware.com

317 SW Alder, Ste 500
Portland, OR 97204
ph (503) 295-6552
fx (503) 961-1047