Question Locked

opening a pdf file in java web application

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

HI,
can anyone please help me out to solve this problem

i developed a webapplication and deployed in tomcat server.
in my web application i need to open a pdf file which is located in my
machine and not in tomcat server.so when i click on the pdf link i
should be able to open the pdf.

onClick="window.open('C:/rajesh/abc.pdf
','mywindow','width=400,height=200,toolbar=yes,
location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=y
es,
resizable=yes')"

this is the code i had written in my jsp,onclicking the link i am not
able to open the pdf as it is not in the scope of the webapplication,

now i had copied the pdf file to apache-tomcat-6.0.16\webapps\myproject
\abc.pdf

when i change the above function to this its working and opening the
pdf
onClick="window.open(http://localhost:8080/myproject/abc.pdf
','mywindow','width=400,height=200,toolbar=yes,
location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=y
es,
resizable=yes')"

please anyone help me in open the pdf file which is located outside my
tomcat server.

Thanks in advance

1 reply

This discussion is closed to new replies.