}
}
protected void _service(WebRequest req, WebResponse resp) throws Exception
{
PortletControllerContextImpl context = new PortletControllerContextImpl(req, resp, getServletContext());
//
PortletController controller = new PortletController();
String type = req.getParameter(URLParameterConstants.TYPE);
//
if (URLParameterConstants.PORTLET_TYPE.equals(type))
{
ControllerRequestFactory factory = new ControllerRequestFactory(context.getPageNavigationalStateSerialization());
ControllerRequest request = factory.decode(req);
//
ControllerResponse response = controller.process(context, request);
//
ControllerResponseRendererFactory rendererFactory = new ControllerResponseRendererFactory(
true,
true,
context.getStateControllerContext(),
request.getPageNavigationalState());
//
Renderer renderer = rendererFactory.getRenderer(response);
//
renderer.render(new RendererContextImpl(context));
}
else
{
PageRenderer renderer = new PageRenderer(new ResponseProperties(), context.getStateControllerContext().createPortletPageNavigationalState(false));
//
renderer.render(new RendererContextImpl(context));
}
}