Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access files ouside web context

Posted on 2007-12-05
3
Medium Priority
?
298 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 120 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 280 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 280 total points
ID: 20416264
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
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.
Suggested Courses

722 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