}
HttpServletResponse response = ( HttpServletResponse ) pageContext.getResponse( );
PortletApplication container = getPortletContainer( );
PortletProxy proxy = ( PortletProxy ) getPortletContainer( ).getPortlet( portletName );
PortletRequestImpl req = new PortletRequestImpl( proxy, request, container.getPortletServiceFactory( ) );
PortletResponseImpl resp = new PortletResponseImpl( proxy, req, response );
PageTag page = (PageTag)findAncestorWithClass( this, PageTag.class );
if ( page == null )
{
throw new JspException( "'portlet' tag MUST be inside a 'page' tag");
}
_portletPageContext.setSkinContextPath( page.getSkinContextPath());
req.setPageContext( _portletPageContext );
proxy.service( req, resp );
pageContext.getOut( ).println( resp.getBuffer( ).toString( ) );
}
return EVAL_PAGE;