Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Spring MVC -- The requested resource is not available.

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Spring MVC -- The requested resource is not available.

    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.


  2. #2
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Spring MVC -- The requested resource is not available.

    Try with the below code

    <p>Please click on the link below to enter.</p>
    <a href="./getApprovedBulletins">Click here.</a>

    Also verify whether internalviewresolver bean is properly defined in your <servletname>-servlet.xml

    Thanks

Similar Threads

  1. Replies: 0
    Last Post: March 17th, 2013, 11:43 AM
  2. The requested resource () is not available.
    By freakycoder in forum Web Frameworks
    Replies: 0
    Last Post: July 10th, 2012, 12:44 AM
  3. Replies: 1
    Last Post: June 27th, 2012, 09:48 AM
  4. HTTP Status 404-The requested resource is not available.
    By DeViLhUnTeR in forum Java Servlet
    Replies: 2
    Last Post: March 7th, 2011, 01:26 PM
  5. Replies: 2
    Last Post: August 4th, 2009, 11:25 PM

Tags for this Thread