?
Solved

Opening a PDF file from a Servlet

Posted on 2005-04-25
6
Medium Priority
?
188 Views
Last Modified: 2013-11-24
I have a PDF file which I want to render to my client.

Once the request come how can read the file from underlying O/S like c:/temp/a.pdf and then render him back ...

Thanx in advance,

RK
0
Comment
Question by:rahulkothari
  • 4
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 total points
ID: 13861244
You need to set the right mime type for the response. See

http://www.javaworld.com/javaworld/javatips/jw-javatip94.html
0
 

Author Comment

by:rahulkothari
ID: 13861345
how about using HttpClient ... let know your views ...

RK
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13861375
Is the client a browser? If it isn't, you're going to have to find either something to plug in to your gui, or run something like Adobe to view it
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 86

Expert Comment

by:CEHJ
ID: 13861379
(HttpClient is non-gui software)
0
 
LVL 92

Expert Comment

by:objects
ID: 13863348
You can use Runtime.exec() to invoke a PDF viewer. Try command something like:

cmd /c start c:\temp\a.pdf
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13866717
:-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

571 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