ServletContext « MVC Controller « Spring Q&A





1. How can I get ServletContext in Controller?    forum.springsource.org

hi, i'm a beginer of spring. i want to get the real path using servletContext.getRealPath("/upload/"), but how can i get ServletContext in a Controller's handleRequest() method? thank you!

2. wiring a controller with a ServletContext attribute    forum.springsource.org

3. How to get ServletContext from class which extends Controller    forum.springsource.org

Hi all, can you please help me how to get servlet context from bean class which extends Controller class. because only the dispatcher servlet extends httpservlet.

4. How to get the ServletContext when using annotated controllers    forum.springsource.org

Hi All, I'm trying to get the path to upload a file using getServletContext().getRealPath(""); inside an annotated controller, but it gives an error message saying undefined. But when I tried it ...