File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Ch04_OutputEscapingJSP/src/main/java/de/dominikschadow/webappsecurity/controller Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1919package de .dominikschadow .webappsecurity .controller ;
2020
2121import de .dominikschadow .webappsecurity .domain .Contact ;
22+ import org .apache .log4j .Logger ;
2223import org .springframework .stereotype .Controller ;
2324import org .springframework .validation .BindingResult ;
2425import org .springframework .web .bind .annotation .ModelAttribute ;
3435@ Controller
3536@ SessionAttributes
3637public class ContactController {
38+ private static final Logger LOGGER = Logger .getLogger (ContactController .class );
39+
3740 @ RequestMapping (value = "/addContact" , method = RequestMethod .POST )
3841 public ModelAndView addContact (@ ModelAttribute ("contact" ) Contact contact , BindingResult result ) {
39- System . out . println ("Firstname: " + contact .getFirstname () + ", Lastname: " + contact .getLastname ());
42+ LOGGER . info ("Firstname: " + contact .getFirstname () + ", Lastname: " + contact .getLastname ());
4043
4144 return new ModelAndView ("contact" , "command" , contact );
4245 }
You can’t perform that action at this time.
0 commit comments