I have these 2 methods
@RequestMapping(value="/")
public ModelAndView listContact(ModelAndView model) throws IOException{
List<Contact> listContact = contactDAO.list();
model.addObject("listContact", listContact);
model.setViewName("home");
return model;
}
@RequestMapping(value = "/newContact", method = RequestMethod.GET)
public ModelAndView newContact(ModelAndView model) {
Contact newContact = new Contact();
model.addObject("contact", newContact);
model.setViewName("ContactForm");
return model;
}
I Also have the required Views called: home.jsp & ContactForm.jsp (in WEB-INF folder)
The home one works, the ContactForm keeps giving me 404.. please help!
Edit:
I followed this tutorial http://www.codejava.net/frameworks/spring/spring-mvc-with-jdbctemplate-example (copied it to be exact, to rule out typos)
I'd like to mention that i do not have a spring-servlet.xml or an applicationContext.xml file, nor did he have that in the tutorial, but something makes me feel like i need it XD
Thanks in advance.