Created
July 3, 2014 12:12
-
-
Save delucas/061d4074f179b95e230f to your computer and use it in GitHub Desktop.
Ejemplo del uso de múltiples variables en el modelo - SpringMVC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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