PDA

View Full Version : Doubt in controller-URGENT Plz.....


rajeshrathod
Jun 16th, 2007, 01:58 AM
Hi to all,

I want to manage 3 jsp pages i.e add,edit,delete using one controller only. so which controller i should use? I also want to implement validator class for validations? While implementing this i am facing binding problem in AbstractCommandController...
Please also mention that how to use as such i am new in spring. Its urgent......

Thanks in advance.

sami25
Jun 16th, 2007, 04:11 AM
Hi,

I want to manage 3 jsp pages i.e add,edit,delete using one controller only. so which controller i should use? I also want to implement validator class for validations? While implementing this i am facing binding problem in AbstractCommandController...

If you want to use a single controller then you can use the MultiActionController,

the signatures must be as follows.


public ModelAndView add(HttpServletRequest req, HttpServletRequest response, Object command){
// inject multiple validators if needed and you would have to validate manually.

}


Please use the appropriate forum, Spring Web for MVC related concerns,problems, doubts.