Question

Locked

opening a pdf file in java web application

By 2rajesh.b ·
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

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Networks Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums