Solved

Access files ouside web context

Posted on 2007-12-05
3
291 Views
Last Modified: 2013-12-02
Have an application in Java running on JBoss 4.0.4 on teh Windows environment. I need to launch (display in browser) a pdf file that does not exist in the web context defined for the app server. The file exists on a network drive.
1) Is there a way to directly launch the file with a URL?
2) If not, is reading and writing bytes the only way out? As this is a pdf file reading and recreating it in browser would need some third-party java libraries which I do not want to get into.
Thanks.
0
Comment
Question by:ptjha
  • 2
3 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 30 total points
ID: 20416235
You would just get the web environment to read the file (see my answer to your other question) then stream it as pdf. Most browsers will cope with it
0
 
LVL 92

Accepted Solution

by:
objects earned 70 total points
ID: 20416253
> 1) Is there a way to directly launch the file with a URL?

no

> 2) If not, is reading and writing bytes the only way out? As this is a pdf file reading and recreating it in browser would need some third-party java libraries which I do not want to get into.

yes only eway, but you don't need to 3rd party library as you only need to stream the bytes. you don't need to decode them

0
 
LVL 92

Assisted Solution

by:objects
objects earned 70 total points
ID: 20416264
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

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…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

777 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