> I am developing a web application using the struts 2 framework. In one > of the actions, I need to create a file at the run-time at a particular > location relative to the path where my web-application is deployed. How > can I retrieve the path at which my Web-app is deployed at run-time in > my action class?
You can implement in action ServletContextAware interface [1], you will get access to ServletContext then you have getRealPath(String) [1] http://struts.apache.org/2.1.2/struts2-core/apidocs/org/apache/struts2/util/ServletContextAware.html Regards -- Lukasz http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]