• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newly added JSP page requested resource is not available

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an existing MVC application that uses the following Dispatcher:

<servlet-mapping>
<servlet-name>SpringDispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

What I did was under the WEB-INF/views directory add a menu.jsp file to be the new startup jsp.

/SpringMvcJdbcTemplate/WEB-INF/views/menu.jsp

New menu.jsp:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<div align="center">
<h1>Main Menu</h1>
<h3><a href="listContact">List Contacts</a></h3>
</div>
</body>
</html>

Now what I did is change the initial "/" RequestMapping controller method to look like the following:

@RequestMapping(value = "/", method = RequestMethod.GET)
public ModelAndView menu(ModelAndView model){
model.setViewName("menu");

return model;
}

Now I feel that everything should work but when I run the application I receive the following page errors:

HTTP Status 404 - /SpringMvcJdbcTemplate/WEB-INF/views/menu.jsp

type Status report

message /SpringMvcJdbcTemplate/WEB-INF/views/menu.jsp

description The requested resource is not available

I am not sure what I am doing wrong. Can anyone help?
 
Steve Holdorf
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was doing something dumb. I misspelled "menu" as "meun". Renamed and now all is better.
 
reply
    Bookmark Topic Watch Topic
  • New Topic