How to open local file or folder (a C:\ drive) in the browser
Hellothe use case is just to open a local address with a click of a button.
11.1.2.3 jdev
I try to open c: in the browser
on the page, I use a button print with the destination, the value file:///c:\
< af:goButton text = 'C: Browse' id = "gb1" targetFrame = "_parent" destination = "file:///c:\". "/ >
in fact, when I provide this URL directly in browse (file:///c:\), it opens fine.
I tried to use escaped without success...
What does take to open a local address with go button?
Published by: grodno on February 20, 2013 02:20
Hello
try following
public void download(FacesContext context, OutputStream out) {
File f = new File("c:\\path\\a.txt");
FileInputStream fis;
byte[] b;
try {
fis = new FileInputStream(f);
int n;
while ((n = fis.available()) > 0) {
b = new byte[n];
int result = fis.read(b);
out.write(b, 0, b.length);
if (result == -1)
break;
}
out.flush();
} catch (IOException e) {
isErroroccured = true;
}
}
Tags: Java
Similar Questions
-
How to open .wim file after backup in Windows 8?
How to open .wim file after backup in Windows 8? The files were backed up on an external hard drive in the form of .wim files before the 'crash' and 8 re-installed windows. Now, I can not restore files. The computer does not recognize the external hard drive when I try to restore through troubleshooting > adv options > System Image recovery.
Hello
Same as Windows 7:
http://support.HP.com/us-en/document/c03056985
Kind regards.
-
How to open local PDF with the new Viewer PDF files?
I would use the new PDF Viewer integrated into Firefox 19.0 Beta to view local PDF from my computer. But when I try to open with Firefox, instead of opening it with PDF.js, Firefox gives me a dialog box asking "Firefox do with this file? It is not an option in Tools/Options/Applications to use default PDF.js, so, how do I use it for local files?
I'm not on the same OS, but don't you have an option to preview in Firefox/Beta. You will need to disable the plugins PDF first.
If you are able to see on the web pdf files ok I see no reason why it won't work on local files as long as you have the permissions to access the involved file path.
-
When I try to open a compressed folder, I get an error message saying: "Windows cannot open the folder. _ Compressed (zipped) folder is invalid. How to open this file without error message?
Click on this link: http://www.vistax64.com/tutorials/65254-zip-file-support-restore.html or
http://www.7-zip.org/download.html
Make sure that you choose the correct version of bit. (32-bit or 64 - bit).
Helped?
-
How to open a file downloaded microsoft word to macos sierra
How to open a file downloaded microsoft word to macos sierra
You should just be able to double-click on it since OS X built a decompression software. But unless you are sure that the source of the MS Word file is safe and secure, be careful, because a typical method of malware distribution is through such files.
-
How to open a file seldomly?
How to open a file seldomly?
http://download.CNET.com/Microsoft-Reader/3000-20412_4-10047475.html
Download
read below the first
-
How to open a file with a .wsx extension
Original title: .wsx extentions?
How to open a file with a .wsx extension
Hello
Where did you get the .wsx files?
Please use your favorite search engine to find a program that can open the .wsx files.
-
How to open a file with a .bar extension?
Anyone know how to open a file with the .bar extension. I can't seem to find a way, and I get junk out of the web says that opens the file, but I find myself with toolbars and other things I don't need or want. Any help would be great. Thank you.
On Sunday, February 12, 2012 21:12:54 + 0000, KevinAmosMDK wrote:
Anyone know how to open a file with the .bar extension. I can't seem to find a way, and I get junk out of the web says that opens the file, but I find myself with toolbars and other things I don't need or want. Any help would be great. Thank you.
See http://filext.com/file-extension/bar and note that
http://FILExt.com/ is a very good place to look for answers to
questions like this.
Ken Blake, Microsoft MVP -
How to open a file with the extension .odg using Vista?
How to open a file with the extension .odg using Vista?
Hi Defiant503,
Thank you for visiting the forums of answers.microsoft.com.
I did some research and a file ending with .odg is an OpenDocument Document OpenOffice/StarOffice (Ver 2) of graphics by Sun Microsystems, Inc. This means that in order to open this file, you will need this program to open it. You will not be able to open this file with Vista.
I hope this information helps.
Kavita M
Microsoft Answers Support Engineer
Visit the Microsoft Answers Feedback Forum site
and let us know what you think. -
I added a server SFTP CDR intended on page... CUCM started pushing files to this server...
But how to open these files?
file name like "cdr_CUCMCluster_02_201509280355_440782".
There is no extension.
I use a windows.
They should be flat files, simply use a text editor to open.
-
How to open any files that are locked
How to open all files that they are locked and encrypted with a unique key RSA 1024
Siapgereak
With the key of course. Without it, you have a problem.
-
How to open zip files that are included with various tutorials?
How to open zip files that are included with various tutorials? Everytime I try I get the message, "It seems that the file has been moved or renamed." I am a total novice with this stuff! Thanks for your help.
On Windows? Right-click on the .zip file that you want to unpack (unzip) and click on "Extract all" from the context menu.
-
How to open a file do?
AI files are opened by Adobe Illustrator
Please visit: graphic design software | Free download Adobe Illustrator CC trial
-
How to open a file with the extension x3f (sigma)
How to open a file with the extension x3f (sigma)?
Doesn't look good: Lightroom / Camera Raw: Sigma SD1 - when Merrill sensors will benefit, please!
-
I'm tryng to open an a 810 Nikon raw file, but does not open. Said GROSS CAN'T camera MODEL. I have re installed nx2 with error code u43m1d207. How to open a file.
You can use the dng converter if update your adobe programs fails.
Adobe - Adobe Camera Raw and DNG Converter: for Windows: Adobe DNG Converter 8.7
Maybe you are looking for
-
Re: Satellite L505-13W - hardware upgrade
Hi all I specified modelhttp://www.Toshiba.EU/discontinued-products/satellite-L505-13W/ and I want to use the design program rhino3d v5. Minimum specifications of the program can be found here:http://www.simplyrhino.co.UK/rhinotraining/hardware.html
-
Disk capacity hard satellite 2550S
Hello I wonder if Toshiba Dynabook Satellite 2550 S supports 40 GB HDD? If no, what is the maximum capacity of the hard drive can detect this laptop? Similarly, what is the graphics card for this device driver, I'm only using standard view type (disp
-
How will I know if I have a virus
my bank online has just been compromised...
-
Cover the problem of crack on Satellite P100
The external plastic of my laptop has started to crack near the hinges. I called Toshiba some time ago and they said that because it was just apparent defects, it was not covered by the warranty. However, it has gotten worse over time, the plastic pa
-
Photosmart 7515: Billboard empty on my Photosmart 7515
The Billboard on my Photosmart 7515 is its vacuum suddenly. I can still prnt all documents, but the screen is blank. So I can't use other features like fax or adapting documents without the touch screen. Any ideas?