File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes accessing httpsession\httpsession attributes in custom validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "accessing httpsession\httpsession attributes in custom validator" Watch "accessing httpsession\httpsession attributes in custom validator" New topic
Author

accessing httpsession\httpsession attributes in custom validator

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

Is it possible to access HttpSession attributes within a Struts 2 custom validator? Thanks.
John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
I realize one way is to call ActionContext.getContext().getSession(). Is there another way?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Why would you want to? The point is to abstract away the servlet spec.
John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Its the way things are around here. I'm not in total control.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing httpsession\httpsession attributes in custom validator
 
Similar Threads
Custom Tag / Custom Validation Not Firing - Facelets
Range validation for dual alpha chars
How do I validate if an input box contains alphanumeric characters?
Custom validator error
How to pass parameters or atributtes to a custom validator