Since this is in a tile, I think what you want in your servlet is disp.include( request, response );
rather than disp.forward( request, response ); If you don't want to stay in your tiles layout, then you should decide that in your action before forwarding to a layout. -john. ----- Original Message ----- From: "Danilo Luiz Rheinheimer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 04, 2003 12:44 PM Subject: Tiles forward question - newbie > Hello , > > I have a stuts/tiles web application and it uses the classic > sidebar-header-footer definition. > I can override the contend body property using this : > > <%@ taglib uri='WEB-INF/struts-tiles.tld' prefix='tiles' %> > <tiles:insert definition='sidebar-header-footer-definition'> > <tiles:put name="content" value="cadastroInicialContent.jsp"/> > </tiles:insert> > > This works ok. > > But how I can override it with a page unknow at design time ? > > I am trying send it to a servlet and then I redirect it to my jsp > page : > > <%@ taglib uri='WEB-INF/struts-tiles.tld' prefix='tiles' %> > <tiles:insert definition='sidebar-header-footer-definition' flush='false'> > <tiles:put name="content" value="servletmostraregistro"/> > </tiles:insert> > > And the servlet code is : > > public class ServletMostraRegistro extends HttpServlet { > private static final String CONTENT_TYPE = "text/html"; > public void init() throws ServletException { } > public void destroy() { } > > public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { > String path = "/tileMostraRegistro"+request.getParameter("cadastro")+".jsp"; > RequestDispatcher disp = getServletContext().getRequestDispatcher(path); > disp.forward(request, response); > } > } > > But this fails with the message : > > [Exception in:servletmostraregistro] Cannot forward after response has been committed > > How I can do it ? > > -- > Best regards, > Danilo mailto:[EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>