Hello all!
I'm using a servlet that creates a PDF file and then opens it.
1)On my main JSP page, I've associated a button click with a link to my servlet, it worked well, the PDF file appeared in the active window.
2)I want now That PDf appears in a secund window, so i've associated the button click to a creation of window and I'm trying to launch the servlet from the new window, here is my code:
_________________________________
<title>PDF</title>
<meta http-equiv="Content-Type" content="application/pdf">
<SCRIPT LANGUAGE="JAVASCRIPT">
function doSubmit(path)
{
window.location.href= path;
}
</script>
</head>
<body onLoad="doSubmit('<%= Constantes.pathServlet %> PDFServlet')" >
</body>
</html>
______________________________________
Doing this, the servlet is called, file created on application server but the PDF does not appear. Actually, it opens a window asking me if I want to download or open my servlet (as if it was a file!!).
Any help??
Tell me if I'm on the wrong forum too...
Alex
I'm using a servlet that creates a PDF file and then opens it.
1)On my main JSP page, I've associated a button click with a link to my servlet, it worked well, the PDF file appeared in the active window.
2)I want now That PDf appears in a secund window, so i've associated the button click to a creation of window and I'm trying to launch the servlet from the new window, here is my code:
_________________________________
<title>PDF</title>
<meta http-equiv="Content-Type" content="application/pdf">
<SCRIPT LANGUAGE="JAVASCRIPT">
function doSubmit(path)
{
window.location.href= path;
}
</script>
</head>
<body onLoad="doSubmit('<%= Constantes.pathServlet %> PDFServlet')" >
</body>
</html>
______________________________________
Doing this, the servlet is called, file created on application server but the PDF does not appear. Actually, it opens a window asking me if I want to download or open my servlet (as if it was a file!!).
Any help??
Tell me if I'm on the wrong forum too...
Alex