• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to inject a httpSession attribute in a bean validation?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I want to validate if a user who logged in a webApp is the same one that appears in the DB table record.

When the user logs in the app, I inject (and can use) the session attributes in my manageb bean through the CDI.

The JPA bean (excerpts of code):



The (CDI) Managed bean (excerpts of code):



The constraint class:



The validator class:



The Exception launched:



Can someone help me ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!