Thank you Deepak, It works fine. -----Original Message----- From: Deepak Kumar [mailto:[EMAIL PROTECTED] Sent: Friday, June 15, 2007 11:22 AM To: Struts Users Mailing List Subject: RE: get real path of a file from action class
Hi, You can get it by using the code: //Get the servers upload directory real path name String filePath = getServlet().getServletContext().getRealPath("/") +"upload"; Have a look at http://www.roseindia.net/struts/strutsfileuploadandsave.shtml. Here you will find the code to save the file on the server also Thanks Deepak Kumar -----Original Message----- From: Ambaris Mohanty [mailto:[EMAIL PROTECTED] Sent: Friday, June 15, 2007 11:10 AM To: 'Struts Users Mailing List' Subject: get real path of a file from action class Hi all, Can anybody tell me how to get the real path of a file from an action class? I'm using struts 1.2.9. Thank you, AM --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]