  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | SV: problem of open a pdf file on client browser through servlet | SV: problem of open a pdf file on client browser through servlet 2004-01-29 - By Mathias H�ggren
Back Hi!
Remove the line: response.setHeader("Content-Disposition","attachment; filename=arswww.pdf");
And it will work just fine.
Brgds Mathias
-- --Ursprungligt meddelande-- -- Fr�n: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:SERVLET-INTEREST@(protected)]F�r KL OOI Skickat: den 29 januari 2004 11:22 Till: SERVLET-INTEREST@(protected) �mne: problem of open a pdf file on client browser through servlet
Hi all,
I have a servlet which send a pdf file to client browser. I have the below code inside my servlet. response.setContentType("Content-Type: application/pdf"); response.setHeader("Content-Disposition","attachment; filename=arswww.pdf");
But this will pop up a dialog whether want to open, save or cancel the file.
How can I make it open the pdf in the client browser without pop up the dialog?
Thanks.
Best regards, KL OOI
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(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 listserv@(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
|
|
 |