This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes problem in ValidatorSupport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in ValidatorSupport" Watch "problem in ValidatorSupport" New topic
Author

problem in ValidatorSupport

garima jain
Ranch Hand

Joined: Sep 22, 2008
Posts: 60
I am writing a small application for Online Test using struts 2.0. I wrote a custom validator class to do validation on the login screen. Following is the code for that:

If I run my application, it gives NPE on sessionMap at line no 13 . That means, struts is not initializing sessionMap variable using its setSession method. Could you please explain the reason for such behaviour.



David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Validators aren't actions--implementing SessionAware means nothing to a validator. SessionAware is for actions.
garima jain
Ranch Hand

Joined: Sep 22, 2008
Posts: 60
thanks David
 
GeeCON Prague 2014
 
subject: problem in ValidatorSupport