iam doing validation using Struts validator.(validation.xml) i have a jsp page with 3 buttons add,edit,delete. i have one field department. i have used DispatchAction with three methods add,edit,delete. if i press add button i will send a "add" value from jsp page with <html:hidden>. this will call add method of DispatchAction. which inturn add department field to persistent store and go back to my jsp page.
when i donot give any value in department field IT WILL SHOW ME THAT DEPARTMENT FEILD IS REQUIRED.BUT THE ADD METHOD OF MY DISPATCHACTION GETS CALLED AND BLANK VALUE IS ENTERED IN DATABASE.ACTUALLY ADD METHOD OF DISPATHACTION MUST NOT GET CALLED.
if any one has faced similar problem please tell me the solution.