Hi,

This has been dicussed in depth last month. You should find several answers
to your questions in the archives

Pierres-Yves

-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
sharad mohan
Envoy� : jeudi 30 ao�t 2001 09:08
� : [EMAIL PROTECTED]
Objet : browser is not getting pdf contents from servlet


Hi everybody

I am sending PDF file�s contents from servlet to a
browser. But at client side it does nothing and this
browser become hang.

Code is �.

response.setContentType("application/pdf");
ServletOutputStream sos = response.getOutputStream();
FileInputStream fis = new FileInputStream("xyz.pdf");

int c = 0;
c = fis.read();
while(c!=-1)
{
sos.write(c);
        c = fis.read();
}
sos.close();
fis.close();

Please help me.

Thanx
Sharad


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to