RE: ServletException Response has already been committed'
Actually, I think I'm completely off on that include element. For some reason I tought a forward element would specify a forwarding ActionForward and include element would specify an included ActionForward. But I think the include element does not exist. You can always make this a servlet instead of the action and then jsp:include that. -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 8:49 AM To: [EMAIL PROTECTED] Subject: RE: ServletException Response has already been committed' This is for the first JSP action path=/updateprovider type=gov.mi.mdch.pe.strutsactions.UpdateProviderAction forward name=success path=/WEB-INF/jsp/UpdProvDetailInfo.jsp/ /action I want to include another JSP in the above jsp using jsp:include page=selectedproviderinfo.do flush=true action path=/selectedproviderinfo type=gov.mi.mdch.pe.strutsactions.SeletedProviderInfoAction include path=/WEB-INF/jsp/SelectedProviderInfo.jsp/ /action This throws Error Message: Error in servlet What am I doing wrong here ??? [EMAIL PROTECTED] 07/24/03 04:57PM Ok I was looking for a way to tell the ActionServlet to include, rahter than forward to the view. It seems you do it with include element instead of forward element in your action mapping configuration. So your action path=selectedproviderinfo.do... should have a include instead of a forward to that view. Hope this does it. ranko -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 4:47 PM To: [EMAIL PROTECTED] Subject: RE: ServletException Response has already been committed' The jsp:include is not a direct JSP and it needs to retrieve data from the database and set the values in the Formbean . I am not sure how this can be achieved, Tiles talks abt it ,but is not clear to me. [EMAIL PROTECTED] 07/24/03 04:34PM 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
RE: ServletException Response has already been committed'
This is for the first JSP action path=/updateprovider type=gov.mi.mdch.pe.strutsactions.UpdateProviderAction forward name=success path=/WEB-INF/jsp/UpdProvDetailInfo.jsp/ /action I want to include another JSP in the above jsp using jsp:include page=selectedproviderinfo.do flush=true action path=/selectedproviderinfo type=gov.mi.mdch.pe.strutsactions.SeletedProviderInfoAction include path=/WEB-INF/jsp/SelectedProviderInfo.jsp/ /action This throws Error Message: Error in servlet What am I doing wrong here ??? [EMAIL PROTECTED] 07/24/03 04:57PM Ok I was looking for a way to tell the ActionServlet to include, rahter than forward to the view. It seems you do it with include element instead of forward element in your action mapping configuration. So your action path=selectedproviderinfo.do... should have a include instead of a forward to that view. Hope this does it. ranko -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 4:47 PM To: [EMAIL PROTECTED] Subject: RE: ServletException Response has already been committed' The jsp:include is not a direct JSP and it needs to retrieve data from the database and set the values in the Formbean . I am not sure how this can be achieved, Tiles talks abt it ,but is not clear to me. [EMAIL PROTECTED] 07/24/03 04:34PM 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
ServletException Response has already been committed'
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
Re: ServletException Response has already been committed'
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]
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]
RE: ServletException Response has already been committed'
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]
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]
RE: ServletException Response has already been committed'
Try this action path=/updateprovider ... forward=/WEB-INF/jsp/UpdProvDetailInfo.jsp / -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2: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]
RE: ServletException Response has already been committed'
It didn't work. It gives me the same error. [EMAIL PROTECTED] 07/24/03 03:48PM Try this action path=/updateprovider ... forward=/WEB-INF/jsp/UpdProvDetailInfo.jsp / -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2: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]
RE: ServletException Response has already been committed'
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]
RE: ServletException Response has already been committed'
The jsp:include is not a direct JSP and it needs to retrieve data from the database and set the values in the Formbean . I am not sure how this can be achieved, Tiles talks abt it ,but is not clear to me. [EMAIL PROTECTED] 07/24/03 04:34PM 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]
RE: ServletException Response has already been committed'
Ok I was looking for a way to tell the ActionServlet to include, rahter than forward to the view. It seems you do it with include element instead of forward element in your action mapping configuration. So your action path=selectedproviderinfo.do... should have a include instead of a forward to that view. Hope this does it. ranko -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 4:47 PM To: [EMAIL PROTECTED] Subject: RE: ServletException Response has already been committed' The jsp:include is not a direct JSP and it needs to retrieve data from the database and set the values in the Formbean . I am not sure how this can be achieved, Tiles talks abt it ,but is not clear to me. [EMAIL PROTECTED] 07/24/03 04:34PM 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]