Hi,

I have a design question about validation in struts. So far I had been doing
most of my validation in my action classes rather than in my actionform.

I was just looking into moving some of the validation into the validate
method of the action form and find that I have to access some information in
the servlet context to do this since the action form itself does not have
all the information to do the complete validation.

I was thinking that this has a couple of problems - 
1. performance since I have to access the same info again in the action
classes. 
2. I feel it is messy because I am making my actionform which is just a
piece/view of the whole picture access information that is outside the view
itself ...

All of the above leads me to believe that most of the heavy duty validation
should happen in the action class. The actionform only does some minor
validation like maybe checking for null (basically just using the
information it knows).

I which case should we not have a validate method in the action classes too?

Please let me know if I am missing something / got something wrong ...

Thanks
Pratima

Reply via email to