I would like to use HTMLDoc to return a PDF file from a servlet.
Here is the code I have used so far but it doesn't return anything. (no
errors, either though). HTMLDoc is being executed because the JSP page being
passed to it is processed. After running the servlet I just get a blank
browser (it doesn't launch Acrobat or have any content)
public void doGet (HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
res.setContentType("application/pdf");
java.lang.Runtime r = java.lang.Runtime.getRuntime();
OutputStream respOut = res.getOutputStream();
java.lang.Process p = r.exec("d:\\program files\\htmldoc\\htmldoc.exe -t
pdf http://localhost:8090/test.jsp");
OutputStream os = p.getOutputStream();
respOut = os;
respOut.close();
}
___________________________________________________________________________
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