Two ways to use redirecting. First one uses the url mapping configured in an xml file. The url seems to be the same for the client (or actually is, depends on the situation). The second one tells the client to redirect to a certain page, so the url in the client changes accordingly.
1. Use the Spring url mappingMap model = new HashMap();
model.put("article_id", "get it from db?");
return new ModelAndView("article", model);
2. Tell the client to go to a certain pagereturn new ModelAndView(new RedirectView("index.jsp"));
Ei kommentteja:
Lähetä kommentti
Huomaa: vain tämän blogin jäsen voi lisätä kommentin.