Additionally, In struts framework you have to reset request header before by
call
request.reset();
request.setContentType("application/pdf");
request.setContentLength(byte.length);
----- Original Message -----
From: "Navjot Singh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 9:53 PM
Subject: RE: PDF file in browser
> if you can reveal the location of the PDFs on your web server.
> Simply put your pdfs under a www/app.com/pdfs/*.pdf and give them links as
> you want.
>
> if you wish to maintain some security.
> 1. send a request to a servlet wit some pdf code or file name
> 2. open the given file from the file system whereever it is.
> 3. convert it into stream.
> 4. push the stream back to browser.
>
> note - must set the appropraite mime/type before you push the stream back.
> may be application/pdf or application/x-pdf
>
> HTH
> Navjot Singh
>
> >-----Original Message-----
> >From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, December 24, 2003 10:50 AM
> >To: 'Struts Users Mailing List'
> >Subject: PDF file in browser
> >
> >
> >
> >
> >Hi All,
> >
> > I am using Struts frame work for our application with Web sphere
> >app server.
> >We have a some PDF files on the app server .When the user clicks on a
> >particular link on
> >the JSP page, we have show a pdf file to the user in a new browser
> >window.
> >Can any one pls tell me the easier procedure to do this??
> >
> >Regards
> >VasudevRaoGupta
> >
> >
> >Confidentiality Notice
> >
> >The information contained in this electronic message and any
> >attachments to this message are intended
> >for the exclusive use of the addressee(s) and may contain
> >confidential or privileged information. If
> >you are not the intended recipient, please notify the sender at
> >Wipro or [EMAIL PROTECTED] immediately
> >and destroy all copies of this message and any attachments.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]