File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlet and FileInputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet and FileInputStream" Watch "Servlet and FileInputStream" New topic
Author

Servlet and FileInputStream

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi everyone,
I try to read a binary file with a servlet. It's working well when i read a local file. The syntax is like that
in = new FileInputStream("d:/xxxxx/file.yyy");
My problem occur when the filename include a machine-name.
in = new FileInputStream("//machinename/d$/xxxxx/file.yyy");
I run the same code in java not with servlet and it's working. What can be the problem.
Thanks
Steve Wall
Greenhorn

Joined: Aug 08, 2007
Posts: 10
I just bumped into the same problem here is the snipped of my code. Whe I try to run it I get a file not found found exception.
Can anyone please tell me what the problem is.
String fileURL = "http://www.nfl.com/matchup.html";
BufferedReader fileStream = new BufferedReader(new FileReader(fileURL));
 
 
subject: Servlet and FileInputStream
 
Similar Threads
File name and extension
problem with reading multiple objects from file
stream
Small .properties problem with multiple platform
problem while reading a file