Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem in using [response.sendRedirect()] in JSP Dynamic Include

  Asked By: Abelerd    Date: Nov 18    Category: Java    Views: 2136
  

I have a problem while using response.sendRedirect() in my Jsp Page.

Scenario:

I have a Jsp page, which has static and dynamic includes
In one of the dynamic include file, i am using response.sendRedirect() to
redirect to another page.

A runtime IllegalStateException is thrown in this case,
as It says the response has already been committed.

But if the response.sendRedirect() works fine when used directly in the main JSP
Page.
that too.. when the buffer size is increased

Questions

1. What is the reason behind this exception.
2. what would be a better Solution this problem?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Minal Nayak     Answered On: Nov 18

Actually, this problem  generally would occur when u write something beofre
redirecting..

So, send me ur code, let me check and help u

 




Tagged: