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

problem in jsp:include tag

urvi patel
Greenhorn

Joined: May 30, 2003
Posts: 17
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
Padmaja Godbole
Greenhorn

Joined: May 10, 2003
Posts: 14
I tried both the options and are working fine.
If you can write more detail or the code may be we can solv it.


Padmaja Godbole<br />---------------------<br />SCJP2
urvi patel
Greenhorn

Joined: May 30, 2003
Posts: 17
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
himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
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


If you want to become a rich, do not work for others but make others to work for you.
Padmaja Godbole
Greenhorn

Joined: May 10, 2003
Posts: 14
check the included file menu.jsp, it must be having an output statement which is the cause of error.
urvi patel
Greenhorn

Joined: May 30, 2003
Posts: 17
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
 
 
subject: problem in jsp:include tag