• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Getting HttpServletRequest from RequestContextHolder in Spring

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
    Bookmark Topic Watch Topic
  • New Topic