• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in jsp:include tag

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...
I am using jsp:include for including code of one page
and i used the syntax.
<jsp:include page="menu.jsp" flush="true">
</jsp:include>
now i also used jsp:forward to forward this page to another page...and i have also
written that
<%@ page autoFlush="true"%>
But it still geves the error that
"Attemt to clear buffer that's already been flushed"
I think problem is beacuse of that jsp:include tag.
please help me.
urvi
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried both the options and are working fine.
If you can write more detail or the code may be we can solv it.
 
urvi patel
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting error in this code..
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<%@ page language = "java" import="java.sql.*,java.io.*" %>
<%@ page autoFlush="true"%>
<%
String regid="1";
String cat_name=request.getParameter("cat_name");
%>
<form name="form1" action="admin_papercat.jsp" method="post">
<jsp:include page="menu.jsp" flush="true">
<jsp aram name="regid" value="<%= regid %>" />
</jsp:include>
<p>
<%
try
{
if(cat_name==null)
{

String cflag="no";
if(cflag.equals("no"))
{
%>
<jsp:forward page="admin_qview.jsp">
<jsp aram name="cat_name" value="<%= cat_name %>"/>
<jsp aram name="regid" value="<%= regid %>" />
</jsp:forward>
<%
}
else
{
out.print("in else");
}
}
}
catch(Exception e1){out.println(e1.getMessage());}
%>
</BODY>
</HTML>
This is the code.... and it's gives error..
Thanking you
urvi
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi urvi ,
Check these links, it might be of your interest.
http://forum.java.sun.com/thread.jsp?thread=298196&forum=45&message=1181769

http://www.experts-exchange.com/Web/Web_Languages/Q_20404615.html
Hope this help
Himanshu patel
 
Padmaja Godbole
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check the included file menu.jsp, it must be having an output statement which is the cause of error.
 
urvi patel
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yaa.. i got the answer.
First i include that page and after that i am forwarding that page to another.
so it gives the error. Afetr that when i include that page after forward tag, so now it's works.
Thanks for ur. suggestions.
urvi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic