I am trying to obtain the complete path to the web server and servlet so I can write to the file system. In the past I have done this from a servlet. However, I am now using struts and wanting to seperate logic so I am passing to my bean the path where it can save the files to.
My question is how do I the server path and servlet path information when using the Struts Action class so I can write to the local file system.
Thank you david
posted 11 years ago
You can use the same method you're used to with servlets by invoking Action.getServlet() which will return an ActionServlet - a descendant of HttpServlet.