Getting a 'No thread-bound request found' error from spring in my web app Getting a 'No thread-bound request found' error from spring in my web app spring spring

Getting a 'No thread-bound request found' error from spring in my web app


To use request scope without Spring MVC, you should declare RequestContextListener in web.xml (see 3.5.4.1. Initial web configuration):

<web-app>  ...  <listener>    <listener-class>        org.springframework.web.context.request.RequestContextListener    </listener-class>  </listener>  ...</web-app>


If you are configuring your app using Java instead of XML the same conf can be applied in

 public void onStartup(ServletContext servletContext) throws ServletException {          //add listener          servletContext.addListener(new RequestContextListener());