miramon Posted September 29, 2009 Share Posted September 29, 2009 Hi,I have created a pdf file using Jasper Report and have saved it in D drive as in D:\Report\info.pdf.I want to call this pdf file from jsp. I tried 'response.sendRedirect("D:\\Report\\info.pdf")' but page does not get displayed.It says Cannot find server.How do I fix this? Kindly help me.Thanks in advance Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 29, 2009 Share Posted September 29, 2009 Hi, You can fix this by reading more about Web applications and how they work. Only after that, you come back to JasperReports and look at the /demo/samples/webapp sample to see how JasperReports could be used inside a Web application. Note that you don't need to generate PDF files on disk, but you can rather stream PDF directly on the response output stream. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
miramon Posted September 29, 2009 Author Share Posted September 29, 2009 Hi teodord, thanks for your response. I have tried that,I generated the report and export it to pdf file in my project itself,it works fine, but the problem I faced is that when I tried viewing the report right after that by using 'response.sendRedirect("\\report\\info.pdf")' an error comes which says 'The requested resource (/xxx//report/info.pdf) is not available.' When I click on the folder where I stored the pdf it is there, but I dont know why it was not loading at that time. I tried putting a delay but even that does not work. I wanted to view the newly created pdf file which had just been created by my application. Please help me.I have tried everything I could Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now