You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Andreas Schildbach <an...@schildbach.de> on 2006/02/03 14:28:43 UTC
What's the deal with the "invoker servlet" from the examples?
[Sorry for posting again, but my post in the user list remained
unanswered for some days.]
Hi everyone,
I'm currently trying to deploy my own portlet into Pluto 1.0.1 by hand.
The window of the portlet already shows up in the Pluto portal, but the
content only shows "Error occurred in portlet!", and there is a
NullPointerException in the log:
java.lang.NullPointerException at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:109)
I looked up the corresponding line in the source:
protected void invoke(PortletRequest portletRequest, PortletResponse
portletResponse, Integer methodID)
throws PortletException,IOException
{
InternalPortletRequest internalPortletRequest =
CoreUtils.getInternalRequest(portletRequest);
InternalPortletResponse internalPortletResponse =
CoreUtils.getInternalResponse(portletResponse);
// gather all required data from request and response
ServletRequest servletRequest =
((javax.servlet.http.HttpServletRequestWrapper)internalPortletRequest).getRequest();
ServletResponse servletResponse =
((javax.servlet.http.HttpServletResponseWrapper)internalPortletResponse).getResponse();
ServletDefinition servletDefinition =
portletDefinition.getServletDefinition();
ServletContext servletContext = servletConfig.getServletContext();
javax.servlet.RequestDispatcher dispatcher =
servletDefinition.getRequestDispatcher(servletContext); <<< ITS THIS LINE
[...]
Looks like servletConfig.getServletContext() returned null. The reason
could be that I defined no "invoker servlet" for my portlet. Before I
elaborate any more, could anyone tell me what's the deal with that
"invoker servlet"? I could not find anything about it in the portlet
specification or in the pluto documentation. Why is it needed, or is
just optional and there is an error in the impl?
Regards,
Andreas
Re: What's the deal with the "invoker servlet" from the examples?
Posted by Patrick Huber <st...@gmail.com>.
Hi Andreas
Portlets can't be called directly like servlets by entering a url into
your browser. The Portal has to invoke them and since the portlets are
potentially in their own webapp, a portlet invocation takes an
indirection via a servlet.
I guess you're missing a servlet entry in your web.xml - but I don't
know anything about pluto-1.0 so I don't know for sure.
Patrick
2006/2/3, Andreas Schildbach <an...@schildbach.de>:
> [Sorry for posting again, but my post in the user list remained
> unanswered for some days.]
>
> Hi everyone,
>
> I'm currently trying to deploy my own portlet into Pluto 1.0.1 by hand.
> The window of the portlet already shows up in the Pluto portal, but the
> content only shows "Error occurred in portlet!", and there is a
> NullPointerException in the log:
>
> java.lang.NullPointerException at
> org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:109)
>
> I looked up the corresponding line in the source:
>
> protected void invoke(PortletRequest portletRequest, PortletResponse
> portletResponse, Integer methodID)
> throws PortletException,IOException
> {
> InternalPortletRequest internalPortletRequest =
> CoreUtils.getInternalRequest(portletRequest);
> InternalPortletResponse internalPortletResponse =
> CoreUtils.getInternalResponse(portletResponse);
> // gather all required data from request and response
> ServletRequest servletRequest =
> ((javax.servlet.http.HttpServletRequestWrapper)internalPortletRequest).getRequest();
> ServletResponse servletResponse =
> ((javax.servlet.http.HttpServletResponseWrapper)internalPortletResponse).getResponse();
> ServletDefinition servletDefinition =
> portletDefinition.getServletDefinition();
> ServletContext servletContext = servletConfig.getServletContext();
> javax.servlet.RequestDispatcher dispatcher =
> servletDefinition.getRequestDispatcher(servletContext); <<< ITS THIS LINE
> [...]
>
> Looks like servletConfig.getServletContext() returned null. The reason
> could be that I defined no "invoker servlet" for my portlet. Before I
> elaborate any more, could anyone tell me what's the deal with that
> "invoker servlet"? I could not find anything about it in the portlet
> specification or in the pluto documentation. Why is it needed, or is
> just optional and there is an error in the impl?
>
> Regards,
>
> Andreas
>
>
--
"I love deadlines. I like the whooshing sound they make as they fly
by." -- Douglas Adams