Skip to content

Instantly share code, notes, and snippets.

@delucas
Created July 3, 2014 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delucas/061d4074f179b95e230f to your computer and use it in GitHub Desktop.
Save delucas/061d4074f179b95e230f to your computer and use it in GitHub Desktop.
Ejemplo del uso de múltiples variables en el modelo - SpringMVC
@RequestMapping("/hi")
public ModelAndView helloWorld(@RequestParam("nombre") String nombre) {
String message = "Hola, " + nombre + "!";
ModelMap model = new ModelMap();
model.put("command", new Persona());
model.put("message", message);
return new ModelAndView("hello", model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment