简体   繁体   中英

What is the use of response.sendRedirect()?

while using respone.sendRedirect("page.jsp") it was showing java.lang.IllegalStateException , while in some pages it was executing properly. How can I avoid this exception? For more details I passed yesterday a question that was simillar to this.

respone.sendRedirect will throw java.lang.IllegalStateException if your response is already committed. You have either manually flush the buffer or it was automatically flushed because it was full. To avoid this, either increase the buffer size and make sure that you are not flushing it or call respone.sendRedirect early.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM