I tried searching here on SO but i couldn\'t find a solution. I have some XML metadata like the following.
You cannot reference the servlet context in your XML like this because its lifecycle is controlled by the servlet container.
The solution is to have com.abc.ProductController implement ServletContextAware and then Spring will set it for you.
com.abc.ProductController