Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting HttpServletRequest from RequestContextHolder in Spring  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to get the HttpServletRequest from RequestContextHolder using Spring MVC.



But while running test cases during the build of the application I'm getting following ClassCastException

java.lang.ClassCastException: java.lang.Object cannot be cast to javax.servlet.http.HttpServletRequest

Is there a way to get the HttpServletRequest from the RequestContextHolder in spring.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!