wood burning stoves
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


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Need Urgent Help Unable to read File from C: Drive

Syed Ali
Greenhorn

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.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63052
    
  69

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]
 
Consider Paul's rocket mass heater.
 
subject: Need Urgent Help Unable to read File from C: Drive
 
jQuery in Action, 3rd edition