The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Just comment a line in your code.

Posted by Kishori Sharan on December 06, 2000 at 9:27 AM

Just comment the following line in your servlet and evrything will start working.


PrintWriter out = res.getWriter();


In theory you should not have get any error becuase forward method of requestdeispatcher throws exception when output in response has been committed and you are trying to forward the request to something else ( in your case JSP ) . Since you have just obtained the writer for response should not result in error , because you haven't writen anything to the writer yet. This problem is evident in your error message. So just remove this line or comment it out.

Thanx
Kishori





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us