Enabling Validation in Struts 2
I’ve been learning Struts 2 recently.
I spent too much time figuring out that in order to enable the framework’s validation behavior, your action classes must extend the ActionSupport class.
The documentation fails to mention this small fact. Maybe it’s common knowledge to experienced Xwork developers, but wasn’t to me. I was very excited to be writing my new web application using POJO’s that didn’t extend any classes, but it looks like you have to unless you feel like rolling your own validation utilities.
Before I started using Struts 2, I learned everything i could about it so that I could be productive with it right away. However, I’ve been learning too much about this framework via the TIAS (try it and see) approach.
I signed up for an Apache confluence account hoping that I’d be able to edit the wiki to supplement the documentation, but am not sure who to contact to get right permissions to the docs.


