I have the following code in a try block and am running up against the 
following exception:

java.io.FileNotFoundException: \dev\javalib\Stripes\projects\myApp\web
\imageUploads\75.jpg (The system cannot find the path specified)

Here's the code:

// code before this creates proper newImageName
...
InputStream inStream = this.getClass().getClassLoader().getResourceAsStream
("myApp.properties");
                                                
logger.debug("*** InputStream: " + inStream);           
                                                
// Open and read the properties file
Properties prop = new Properties();
prop.load(inStream);

String imgDir = prop.getProperty("myApp.location.imageUploads");
logger.debug("*** dir from property: " + imgDir);               

String imgPath = new String(imgDir + File.separator + newImageName);
logger.debug("*** imgPath: " + imgPath);                

// save the image to WEB-INF/imageUploads
image.save(new File(imgPath));

I'm running on Windows.  Even though my Eclipse installation is on the D: 
drive, I suspect Tomcat is trying to create the file in the C: drive, so I 
created the following dir:

    C:\dev\javalib\Stripes\projects\ilostandfound\web\imageUploads

Still, no luck.  What gives?!


------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to