Solved

Access files ouside web context

Posted on 2007-12-05
3
289 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
Comment Utility
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
Comment Utility
> 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
Comment Utility
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now