Hello Keven,

The error message you got says exactly what is wrong: you can't do a
forward once the response is committed.

Checking your code, it appears that you do a forward in a page inserted
by the template. This is not possible due to jsp specification.
Templates use "include" to do the insert. A side effect is that the
output stream is flushed, and response committed. So, once you have done
an include, you can't do a forward ...

Cedric

Keven wrote:

>Hi, all:
>
>I appreciate any/all helps from you.
>
>The senario:
>There is a "JoinUs" link on the top menu of a page. When I click on the link, I want 
>the registration form displayed in the body area.
>
>The Problem:
>When I click on "JoinUs" link, I got nothing on the body area. on the log, I got the 
>error message saying:" can't forward response after it is commited."
>
>My Related Jsps:
>---------------------------------------------------------------------------------
>...
><a href="join.jsp">joinUs</a>(this link is on the top menu)
>---------------------------------------------------------------------------------
>
>join.jsp
>-------------
><%@ page language="java" %>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
><template:insert template="home_template.jsp">
>  
>  <template:put name="header" content="header.jsp"/>
>  <template:put name="body" content="joinUs_body.jsp"/> 
> 
> </template:insert>  
>
>--------------------------------------------------------------------------------------------
>joinUs_body.jsp
>--------------
><%@ page language="java" %>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> <logic:forward name="joinus"/> 
>
>-------------------------------------------------------------------------------------------
>Struts-config.xml
>----------------------
><global-forwards>
>      <forward name="joinus" path="/editRegistration.do?action=Create"/>
></global-forwards>
>
> <action    path="/editRegistration"
>                type="com.ces.p2pbet.client.registration.EditRegistrationAction"
>                name="registrationForm"
>                scope="request"
>                validate="false">
>      <forward name="success"              path="/registration.jsp"/>
>  </action>
>
>----------------------------------------------------------------------------------------------
>It complains that the response has commited when it excute "<logic:forward 
>name="joinus"/> " in the joinUs_body.jsp.
>
>I tried but I can't figure out what is wrong here. I appreciate your help.
>Thank you very much
>
>Regards,
>Keven
>
>
>
>
>
>
>
>
>  
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to