File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes illegalstateexception i am getting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "illegalstateexception i am getting" Watch "illegalstateexception i am getting" New topic
Author

illegalstateexception i am getting

A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
Hi friends,
The following error i am getting in jsp can you tell me why it is coming.response.sendredirect(); is not working in my jsp,there only error is coming.

[ June 08, 2006: Message edited by: Bear Bibeault ]

Thanks,
www.Admakr.in
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
can we have your JSP and possibly some info about that page
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It seems like somewhere in your JSP you have already written to the response (commited the response) before doing the redirect.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Shift the redirect logic earlier in the page before you do any output.
Alternative: make the page buffer bigger <%@ page buffer="16k" %>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I've just added an entry in the JSP FAQ for IllegalStateException with a code example for fixing/preventing it.

http://faq.javaranch.com/view?IllegalStateException


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: illegalstateexception i am getting
 
Similar Threads
Internal Server Error 500
servlet exception in index page of my website.
Navigation not working
Tiles Error
Cannot find message resources under key ...