portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Dam <d....@hippo.nl>
Subject Re: NULL servletcontext for local portlet apps
Date Tue, 18 Dec 2007 10:00:33 GMT
There is one problem though: there's no way of getting the context root 
outside of the scope of the request, is that right? That's probably why 
the local portlet app's context root is set to <portal> :)


David Sean Taylor wrote:
>
> On Dec 17, 2007, at 2:22 PM, Dennis Dam wrote:
>
>> Hi all,
>>
>> Does anybody know why the context root of local portlet applications 
>> is set to "<portal>" in PortletApplicationManager ? I ran into the 
>> problem when I got a NPE for the local servletcontext when I deployed 
>> a portlet app in the local deploy dir, by accident :) My portlets do 
>> cross-context includes and use the ServletContextProviderImpl to 
>> fetch the portlet app's servlet context, and use that context to get 
>> the other webapp's context.  Can we safely change <portal> to 
>> jetspeed's context root ? Even better, since we know that the portlet 
>> app is running locally, why not use Jetspeed's servletcontext when 
>> creating portlet instances in 
>> JetspeedPortletFactory.getPortletInstance() ? For example:
>>
>> PortletContext portletContext;
>> if (pa.getApplicationType()==MutablePortletApplication.LOCAL){
>>  portletContext = 
>> PortalAccessor.createPortletContext(jetspeedServletContext, pa);      
>> // use jetspeed's servlet context    } else {
>>  portletContext = PortalAccessor.createPortletContext(servletContext, 
>> pa);     // default }
>>
>> the only thing left to do is inject the Jetspeed servletcontext 
>> Spring bean in the JetspeedPortletFactory to set the 
>> jetspeedServletContext var.
>>
>> WDYT?
>>
> Im not sure why its set to <portal>, doesn't seem to have any 
> significance
> Im OK with changing this to the /jetspeed context
> When local PA's were first implemented, I felt like it fell short 
> since we the servlet container could not retrieve resources from the 
> local portlet app
> When I say resources I mean html, css, javascript kind of files
> So even though we solve the class loader nicely, this solution 
> requires all local PAs to share their resources (like the layout 
> portltets do) directly out of the parent /jetspeed context
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message