Solved

Access files ouside web context

Posted on 2007-12-05
3
295 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ebay messages api 6 41
Obsolete font tag need to convert to CSS 3 55
DTD and JAVA versions 1 56
Github api to fetch the number of collaborators in a git repo 1 68
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.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

738 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