Hello,
I am calling main.jsp from a html page. This main.jsp consists of few include files e.g. as below:
*************************************************************
html content ...
<%@ file="x.jsp" %>
html content ...
<%@ file="y.jsp" %>
html content ...
<
jsp:include page="../summaryReport.do" flush="true">
<jsp
aram name="app_name" value="FVP" />
</jsp:include>
html content ...
<%@ file="z.jsp" %>
html content ...
*************************************************************
Where the problem is occuring due to JSP:INCLUDE action.
I am getting the following error:
Error 500: ERROR: Cannot forward. The response has already been committed.
In that action, I am calling a
struts action with few input parametrs. This prepares a sql, executes it, get the output data and displays in a jsp (e.g a.jsp). The ActionForward is set to this a.jsp page on success. I have debugged the code. I was able to see the proper execution till this actionforward. After that it displays above error message with the remaining HTML content. The whole request is part of a session.
Requested Questions:
How I can avoid this problem?
Is there any other best way to do it?
What is the problem with my code?
Any solutions are welcome.
Thanks
Nagesh.