This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I want to get the real path of a file and then using this path perform some operation within the action class. In servlets we used to have servletcontext.getrealpath("file name"), but within the ActionClass.execute() method how can i get the same information.
The Action class that your action extends also has a getServlet() method, which returns the ActionServlet instance. Once you have this object, you can get the ServletContext and any other objects you would normally get from your own servlet in a non-Struts application.