Your original mail says you use the following:
<jsp:forward page="ITmenu.jsp" />
</jsp:forward>
Why are you adding the second </jsp:forward>? I think maybe this is your
problem. Also, always return afterwards, unless it'e the last code on the page.
Example:
... do stuff...
if(blah)
{
%>
<jsp:forward page="NextPage.jsp" />
<%
return; // This will stop execution of this page
}
... do more stuff...
However, "return;" will cause an exception if it's the very last statement on
the jsp (basically, it's redundant)
______________________________ Reply Separator _________________________________
Subject: Re: problem with <jsp:forward>
Author: veronique.dupierris ([EMAIL PROTECTED]) at unix,mime
Date: 4/19/00 3:58 AM
Hi,
To use jsp:forward you shouldn't have output anything before in your page if
the page has no buffer ... See the JP1.1 Spec. :
"If the page output is buffered then the buffer is cleared prioir to forwarding
.
If the page output was unbuffered and anything has been written to it, an attemp
t
to forward the request will result in an IllegalStateException."
Maybe you could try to increase the buffer size ....
Hope This Help
Veronique
Varun a *crit :
> hi all!
>
> some of u replied to my problem (original mail below)
> that i should use
>
> <jsp:forward page="ITmenu.jsp" />
>
> only.
>
> I tried using that, but the problem still exists.
>
> Kuldip suggested that maybe there is some
> problem with my browser(IE 5.0) settings.
> Could u pls. suggest what settings do i need to change.
>
> Thnx
>
> Varun
>
> ----- Original Message -----
> From: Varun <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 18, 2000 2:13 PM
> Subject: (no subject)
>
> > hi all!
> >
> > i'm having this peculiar problem....
> >
> > if i use
> >
> > <jsp:forward page="ITmenu.jsp" />
> > </jsp:forward>
> >
> > then i get an error :
> >
> > java.io.IOException: Error: Attempt to clear a buffer that's already been
> flushed
> > at com.sun.jsp.runtime.JspWriterImpl.clear(JspWriterImpl.java:115)
> > at
> C_0003a.varun.jswdk_0002d_00031_0005f_00030_0005f_00031.help_0002ddesk.jsp.p
> roject_00032.jsp_0005cproject_00032_0005clogin_0002ejsplogin_jsp_12._jspServ
> ice(jsp_0005cproject_00032_0005clogin_0002ejsplogin_jsp_12.java, Compiled
> Code)
> > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java,
> Compiled Code)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java,
> Compiled Code)
> > at
> com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java,
> Compiled Code)
> > at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java,
> Compiled Code)
> > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java,
> Compiled Code)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java,
> Compiled Code)
> > at
> com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled
> Code)
> > at com.sun.web.core.Context.handleRequest(Context.java, Compiled
> Code)
> > at com.sun.web.server.ConnectionHandler.run(ConnectionHandler
> >
> >
> >
> > If i use
> > response.sendRedirect("ITmenu.jsp").....
> >
> > suppose i have a file A.jsp having code like this...
> >
> >
> > if(request.getParameter("submit")!=null)
> > {
> >
> >
> > if(request.getParameter("type").equals("IT"))
> > {
> > response.sendRedirect("ITmenu.jsp");
> > }
> >
> > }
> >
> > When i click the Submit button, the file A.jsp is displayed
> > and below it I get a message
> > DOCUMENT MOVED HERE
> >
> > HERE is a hyperlink which takes me to the
> > file ITmenu.jsp
> >
> > Nowhere have I done any coding like this!
> >
> > Any help will be much appreciated
> >
> > I'm using JSWDK-1.0.1 on Windows NT m/c
> >
> > Thnx
> >
> > Varun
> >
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST"
.
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets