Win a copy of Head First Android this week in the Android forum!

Twoz Lee

Greenhorn
+ Follow
since Aug 12, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Twoz Lee

Hi everyone,

I would like to have the list of the countries in the world.

If you can give the countries and their office language, it will be great.

Yours Sincerely

Tommy
11 years ago

Marc Cracco wrote:

I'm not sure which methods in your controller class you're referring to. For example if you're using a SimpleFromController and handleRequest() then it is
an implementation of org.springframework.web.servlet.mvc.Controller Interface and the API is :

Method Summary

ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
Process the request and return a ModelAndView object which the DispatcherServlet will render.

So all you can return is a ModelAndView... or a subclass
I believe it's the same for onSubmit()...

Is that what you were looking for?


Spring Framework Doc 2.5.6

Marc




i use annotation - Controller , so i do not extends different SimpleFromController or other controllers

btw, where do you get the information that we can return ModelAndView and its subclass.

and also in the example method that which includes HttpServletRequest, HttpServletResponse .

where do you get the information in which documents?

11 years ago
Dear all,

usually the return object from the method in controller class are ModelAndView.

I just wonder what kind of object, we can return and can we redirect to other path in controller.

Also, I wonder where we can obtain the information.

11 years ago
Dear all,

following is the example from Spring document.

How can we send more then one Validator?

Also, How can we bind particular Validator to particular method?

Following example only use one Validator and use @Valid to bind the processFood method


11 years ago
I would like to add validation later on, so i have added spring:bind tag from original jsp page. However, the view can not find the object of command.login_id

so what can i do ?

JSP - test.jsp




Controller (MultiActionController)


Spring_mvc_config.xml



Error Message



11 years ago