This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I'm having some trouble getting my struts 2 validation to work properly let alone getting fielderror tags displayed.
The action mapping:
The action class itself:
An interesting part of the log file (full log is attached):
He runs the validators but still executes the query part of the execute method.
He doesn't return to the input page because afterwards the url is like this: .../search/searchByPrice.action?minPrice=&maxPrice=&resultCount=10
My first guess would be that it's because you're using primitive doubles. The default value of a primitive double is 0, and you're using the "required" validator, so there's no reason for the framework to think they don't exist.
If you want to use the "required" validator I think you'd need to use the object version, Double.
Joined: Jan 29, 2009
Yep that worked. I'm having a "I-can't-believe-I-couldn't-come-up-with-that-myself" moment.
Anyway, thanks a lot!