How do you put information in ModelMap without appearing in the query line?

If I add the ModelMap attribute:

    model.addAttribute("abc", 123);

and display the view:

@RequestMapping(value = "/foo", method = RequestMethod.GET)
public final String foo(HttpServletRequest request, BindingResult bindResult, ModelMap model) {
    model.addAttribute("abc", 123);
    return "foo";
}

I see this in the address bar of the browser:

http://localhost:6060/foo?abc=123

Is it possible to add an attribute to a model without displaying it as a pair of query string names? (I am using Spring MVC 3.0)

+3
source share
2 answers

You are probably using annotation @ModelAttributesomewhere in your controller.
see the answer to this question .

+2
source

POST, URL-, . URL- - , "", URL-. -, , - 1990- .

+1

All Articles