• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IllegalStateException

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

When forwarding from a Login Servlet to another servlet using the RequestDispatcher forward() method, I get the IllegalStateException: response has already been committed error.

From what I've read, once a servlet is invoked, the response object and it's buffers are completely empty and as such there shouldn't be anything in them to have the "committed" flag toggled as far as I know. This article was my reference ( http://www.jguru.com/faq/view.jsp?EID=501393 )

In my servlet, a simple login verification is performed and then a user bean is created and added to the session if the user is accepted. From that point, I would like to be able to forward to another servlet but I get this error.

Any suggestions?

Thanks,
Jason
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just found this article ( http://faq.javaranch.com/view?IllegalStateException ) by SEARCHING, what a concept! I'll be trying this out and hopefully will solve my problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic