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]>

Reply via email to