Hello,
I am performing an XSLT transformation inside a org.springframework.web.servlet.mvc.Controller class and I've discovered that the controller views the relative root as my drive root, not my webapp's root, and therefore my transformer class is having trouble finding the xslt file that is in my webapp.
How can I obtain the absolute filesystem path to my webapp from within a spring Controller? In the pure servlet world, you can do this by obtaining the ServletContext and doing a getRealPath() invocation. But since I'm inside a controller, (specifically the handleRequest() method) I don't have access to the ServletContext.
Help! How can this be done?


Reply With Quote