File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Dispaching a request from Servlet to JSP ERROR (its urgent please help me) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Dispaching a request from Servlet to JSP ERROR (its urgent please help me)" Watch "Dispaching a request from Servlet to JSP ERROR (its urgent please help me)" New topic
Author

Dispaching a request from Servlet to JSP ERROR (its urgent please help me)

amitji jain
Greenhorn

Joined: Jan 06, 2011
Posts: 1
Hi all,

i am making basic web application using "jsp servlet" without using session n all . following error is coming when i m dispatching request.

java.lang.IllegalStateException: Cannot forward after response has been committed
com.test.servlets.login.doPost(login.java:103)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


please help me.
thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62269
    
  68

Did you look in the Servlets FAQ?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3881

And Welcome to CodeRanch, Amitji Jain


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Javin Paul
Ranch Hand

Joined: Oct 15, 2010
Posts: 294



forward() should be called before response has been committed to the client ,if hte response has already been committed then this method throws IllegalStateException.


SQL Query Interview Question
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dispaching a request from Servlet to JSP ERROR (its urgent please help me)