File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Need Urgent Help Unable to read File from C: Drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

Need Urgent Help Unable to read File from C: Drive

Syed Ali

Joined: Oct 08, 2008
Posts: 29
Please i need urgent hep, i tried all articles from google to solve this simple issue but nothing is working

i am only trying to read a simple image file from C drive in the image directory C://image but unable to create a file from server , it works in the windows env but does not work when war file is uploaded on server.

please need help my projret dead line is close but no solution is working.

String prefix = "C:\\image\\";
String imageName = "image.gif";

File file = new File(prefix+imageName);

Unable to make file from above code, please guide me what i am doing wrong , it works in the windows environment but says file not found when uploaded to tomcat server on the internet.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60822

This is the same question as your other posts. Please continue any discussion in your original post.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Need Urgent Help Unable to read File from C: Drive
Similar Threads
Urgent !
Upload Image File Tomcat - File Path Not read in UNIX