aspose file tools*
The moose likes JSP and the fly likes JSP:INCLUDE Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP:INCLUDE Issue" Watch "JSP:INCLUDE Issue" New topic
Author

JSP:INCLUDE Issue

Nagesh Rachakonda
Ranch Hand

Joined: Dec 04, 2003
Posts: 34
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.
Nagesh Rachakonda
Ranch Hand

Joined: Dec 04, 2003
Posts: 34
Guys,
Any inputs on this . . . .please . . . ?
I am using JDK 1.3 and JSP 1.1 versions for WAS 4.
Thanks.
[ May 03, 2004: Message edited by: Nagesh Rachakonda ]
Nimchi Yung
Ranch Hand

Joined: Jan 27, 2004
Posts: 71
You need to move to JSP 1.2 container.
--Nimchi
 
jQuery in Action, 2nd edition
 
subject: JSP:INCLUDE Issue