This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

JSP:INCLUDE Issue

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to move to JSP 1.2 container.
--Nimchi
 
reply
    Bookmark Topic Watch Topic
  • New Topic