I have a JSP and controller that aren't working. Here is the link in my JSP.
<p>Please click on the link below to enter.</p> <a href="/getApprovedBulletins">Click here.</a>
Here is the relevant portions of my controller class.
@Controller @SessionAttributes("bulletin") public class BulletinsController { private List<Bulletin> bulletins; private BulletinDAO bulletinDAO; ModelAndView mav = new ModelAndView(); @RequestMapping(value = "/getApprovedBulletins", method = RequestMethod.GET) public ModelAndView getApprovedBulletins() { try { bulletins = bulletinDAO.getApprovedBulletins(); mav.setViewName("EnterBulletin"); if (bulletins != null) { mav.addObject("bulletins", bulletins); } } catch (Exception e) { System.out.println(e.getMessage()); mav.setViewName("FailurePage"); } return mav; }
I get the following error message in my browser window when I click on the link.
HTTP Status 404 - /getApprovedBulletins -------------------------------------------------------------------------------- type Status report message /getApprovedBulletins description The requested resource (/getApprovedBulletins) is not available.