ServerContext reqCtx = invocation.getServerContext();
ServletContext targetCtx = portletApplication.getContext().getServletContext();
try
{
CallableImpl callable = new CallableImpl(invocation);
reqCtx.dispatch(targetCtx, invocation.getRequest(), invocation.getResponse(), callable);
return callable.response;
}
catch (Exception e)
{
if (e instanceof PortletInvokerException)