RE: get real path of a file from action class
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]
RE: get real path of a file from action class
getServlet.getContextPath.getRealPath(File); Regards Srinivas Gurram IT Consultant LogicaCMG - Releasing your potential Divyasree Technopolis 124 - 125 Yemlur Main Road, Off Airport Road Yemlur P.O Bangalore 560 037 India Tel: +91 80 4194 extn 20195 M: +91 99001 44579 Fax: +91 80 41943666 E : [EMAIL PROTECTED] http://www.logicacmg.com/ P We have a responsibility to the environment Before printing this e-mail or any other document, let's ask ourselves whether we need a hard copy -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 This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]