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?

Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to