I am using Eclipse, Spring MVC, Maven and Tomcat. This index.jsp
displays exactly as show below in the web browser. It is not rendering properly.
Any idea what is wrong?
index.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>Index</h1>
</body>
</html>
@Controller
public class HelloController {
@RequestMapping("/greeting")
public String sayHello() {
System.out.println("Greeting");
return "hello";
}
@RequestMapping("/")
public String index() {
System.out.println("Index page");
return "index";
}
}