Solved

Access files ouside web context

Posted on 2007-12-05
3
293 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Suggested Solutions

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.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

808 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