[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to open a pdf file (generated dynamically at user request).

Posted on 2009-04-22
5
Medium Priority
?
584 Views
Last Modified: 2012-05-06
Hi all.
I am working on a web application. which is deployed on a websphere application server 6.0.
In my application a back end job generates a pdf file based on the user input. The file is genrated and placed on server.  I get a logical path to access the file. This path is then indeed sent to a jsp page where it represents in form of link for user to open. If the client browser is mozila or safari, the file opens correctly. However, user do not get the same result if the browser is IE (6 or 7) .  As the file is on server it do not shows a error page and tries to open the file and here the browser shows garbage data on the screen.


The attached code is for the path which I get from the server and then tries to access the link.

I have also tried using sendredirect on the servlet and window.open on the jsp page.
<a href="/chowgule/Documents/Reports_pdf/GEN_REG.pdf" target="_blank" >Download</a>

Open in new window

0
Comment
Question by:globalnest
  • 3
  • 2
5 Comments
 
LVL 3

Assisted Solution

by:SPARC-DESIGN
SPARC-DESIGN earned 800 total points
ID: 24207272
0
 
LVL 1

Author Comment

by:globalnest
ID: 24211986
Hi SPARC-DESIGN,

Thank you for reply.

I have not done any coding for downloading the file. The code shown on the link seems to work fine . However, If I pass on any other file say .pdf or .doc which is externally generated (i.e, not by the internal job ) then it works fine with the code I have given. Is it something related to browser setting?  because, as I have mentioned earlier the files are working fine with mozila or safari but not with IE.

Rahul
0
 
LVL 3

Assisted Solution

by:SPARC-DESIGN
SPARC-DESIGN earned 800 total points
ID: 24212013
Goodmoring,
I've found this page: http://kb.adobe.com/selfservice/viewContent.do?externalId=328233
Check out point 4. This might solve your problem.
if not, please tell me.
Greets
0
 
LVL 1

Accepted Solution

by:
globalnest earned 0 total points
ID: 24913678
Hi,
I have found the solution for the problem. I t was due to secutrity issue of the AS/400 .
Application needs to be given some read only access to the file system

Thanks
0
 
LVL 1

Author Comment

by:globalnest
ID: 24913743
Hello SPARC-DESIGN,
Thank you for your time. I really appreciate the help as it was given when
 it was most needed.
Thank you again for your help.

Rahul Ashar
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question