I believe it is because to read input & write output from the client,
servlets use stream classes which inherit from stream classes in the java.io
package.
Some of the methods of these servlet streams throw IOExceptions themselves.
These streams are retrieved by a servlet using request.getInputStream() and
response.getOutputStream().
Because the servlet container creates the request and response objects and
passes them to the servlet, I think it makes sense that if it's handing out
bad streams to the servlets it needs to find out about it.
@See
javax.servlet.ServletRequest.getInputStream()
javax.servlet.ServletInputStream
javax.servlet.ServletResponse.getOutputStream()
javax.servlet.ServletOutputStream
java.io.InputStream
java.io.OutputStream
in the APIs for more info.
Scott Evans
> -----Original Message-----
> From: Pattabiraman_Meenakshisundaram [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 24, 2000 1:28 PM
> To: [EMAIL PROTECTED]
> Subject: off topic
> Importance: High
>
>
> Hi,
> I have a basic doubt and is outside the scope of JSP.
> Could any one tell me the reason for a servlet throwing
> IOException. I am
> forced to include java.io package just for the sake of this exception.
>
> Thank you.
>
> Regards,
> pattabi
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets