When the ActionServlet forwards to your view that is usually the only forward that happens and everything is fine. When you include another Struts Action in your view with <jsp:include>, another forward happens.
If you are not doing anything in the Action but returning an ActionForward to the jsp page, maybe you can just go directly to the page in your <jsp:include> tag. I don't know how kosher that is in the Struts environment though. Is there a way to tell ActionServlet to use include() instead of forward()? ranko -----Original Message----- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 3:42 PM To: [EMAIL PROTECTED] Subject: RE: ServletException Response has already been committed' Going thru the struts archives it is clear that once forward() is done then the exception is raised. But can some one help as how this can be achieved using Struts. I am new to struts so this may be a naive questions, but how can I show a JSP page without using forward ? This is what I ma trying to do <action path=/updateprovider ...> <forward name="success" path="/WEB-INF/jsp/UpdProvDetailInfo.jsp"/> </action> The UpdProvDetailInfo.jsp has the includes, so without forward how can I even show the page. Or Am i missing something.. Thanks >>> [EMAIL PROTECTED] 07/24/03 03:29PM >>> I'm not sure how ActionServlet processes ActionForwards, but if it uses the forward() method of the RequestDispatcher then the response cannot be commited already. In addition, forward() will commit so you cannot try to commit again. This means that if you have more than one <jsp:include> mapped to a Struts Action, then you will try to commit the respnose twice. Or after the the Action is done, the rest of the jsp page will try to write more stuff to the client and cause the exception. If the ActionServlet is not using RequestDispatcher.forward() then I don't know. More experienced Struts guys will probably be able to clear this up. ranko -----Original Message----- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2:57 PM To: [EMAIL PROTECTED] Subject: Re: ServletException Response has already been committed' I checked it , it works fine when I just use the "selectedproviderinfo.do" . I get this error when I try to Include this another jsp page. Thanks >>> [EMAIL PROTECTED] 07/24/03 02:47PM >>> is there a chance that accessing "selectedproviderinfo.do" by itself would also cause the same servletexception ? From: "Sashi Ravipati" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: ServletException Response has already been committed' Date: Thu, 24 Jul 2003 14:39:34 -0400 I have a jsp page which I need to include in all my other JSP pages. I created an action for JSP to be included and used <jsp:include page="selectedproviderinfo.do" />. This throws Servlet Exception. I also tried <tiles:insert page=page="selectedproviderinfo.do" /> but the same result. How can this be achieved. Thanks _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]