users@glassfish.java.net

Re: OSGi Dynamic Resources? (osgi-http)

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Tue, 19 Apr 2011 04:56:43 +0530

Hi Robert,

No, that's not currently possible by default. We don't install any
resource processors that can explicitly handle jsf/jsp resources
registered via osgi-http service. I do not know if it is as simple as
adding JSP-Servlet or JSF-Servlet as a handler while registering these
resources using registerResource() method. If you have any more ideas,
let me know.

For the record, osgi-web-container is currenty only used to implement
OSGi/Web application specification of Enterprise OSGi Specification.
Although it is possible to extend its functionality to do what you are
asking for, we have not done it.

Although osgi-web-container does not allow resources to be added
dynamically, it supports a notion of WAB fragment wherein a /fragment
bundle/ is used as a /web fragment/ thereby one can expand the namespace
of the web application without modifying the original WAB. For the
fragment bundle to be attached to the host, one has to re-resolve the
host WAB though. Would this meet your requirement? It is actually quite
straight forward to use. There is a test case attached in issue #12913
[1] that demonstrates this functionality.

Thanks,
Sahoo

[1] http://java.net/jira/browse/GLASSFISH-12913

On Monday 18 April 2011 04:04 PM, Robert Weeks wrote:
> Hello -
>
> I was curious if there was a way to make the resources that can be served from inside a bundle (using osgi-http) render jsp/jsf?
>
> For example - I know we can serve static from there (via registerResources) and call them via /osgi/<path_defined> - but is there a way to store jsp/jsf files in here and have them render as well?
>
> I see the osgi-web-container allows you to deploy war/wab as an OSGi bundle (with the meta set appropriately) - and I really don't want to use pax-web in here (which seems to maybe do what I want) - I was just thinking Glassfish (3.1) should have a way to support this as well.
>
> Does it?
>
> Thanks for any information.
>
>
> Robert Weeks
> Senior Software Developer
> EXTENSION, INC.
> Email: rweeks_at_ext-inc.com
> Office: 260-797-0200 x4228
> General: 877-207-3753
> www.OpenTheRedBox.com
>
> Download the FREE EXTENSION Mobile App for iPhone and iPod Touch
> http://www.opentheredbox.com/iPhone_appDemo.php
>
> Email us at demo_at_ext-inc.com<mailto:demo_at_ext-inc.com> to pre-schedule a LIVE demo for our HealthAlert for Nurses solution at the AONE Conference in San Diego. Visit us at booth #118
>
>
>