Hi 

I am trying to store a file in my webapp (Tomcat on Fedora) and am
using 

File serverFile = new File(file_pathname); 
serverFile.createNewFile();             
FileOutputStream os = new FileOutputStream(serverFile);         
os.write(fileData);                     
os.close();
        
but I am getting a

java.io.IOException: No such file or directory
   at java.io.File.performCreate() (/usr/lib/libgcj.so.6.0.0)
   at java.io.File.createNewFile() (/usr/lib/libgcj.so.6.0.0)
   at datingapp.Photo.store() (Unknown Source)
   at
datingapp.PhotoProfileAction.addPhoto(javax.servlet.http.HttpServletRequest,

org.apache.struts.action.DynaActionForm,
datingapp.utils.DatingappSession) (Unknown Source)
   at
datingapp.PhotoProfileAction.execute(org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse) (Unknown Source)
   at 
org.apache.struts.action.RequestProcessor.processActionPerform(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, 
org.apache.struts.action.Action, org.apache.struts.action.ActionForm, 
org.apache.struts.action.ActionMapping) (Unknown Source)
   at
org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) (Unknown Source)

bla.. bla... 

for the pathname I have used the following (always getting the same
error):

datingapp2/user_images/337247852440.jpg
/datingapp2/user_images/2342051028.jpeg
datingapp2/user_images/337247852440_thumb.jpg
user_images/427613272763.jpeg

where datingapp2 is the folder (in webapps) for datingapp, and
user_images is a folder I have placed directly under datingapp2. 
Permissions to user_images is set at 775.

When I use the following as the pathname

/var/lib/tomcat5/webapps/datingapp2/user_images/

I get a "this web page could not be displayed message" and can no
longer access any Tomcat web page (defalt EI6 page), which I am 
presuming means that Tomcat has barfed.  

Does anyone know what might be going wrong here?  What should I do to
fix this?  






 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to