File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP:INCLUDE Issue

 
Nagesh Rachakonda
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to move to JSP 1.2 container.
--Nimchi
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic