diff --git a/WebContent/WEB-INF/views/index.jsp b/WebContent/WEB-INF/views/index.jsp new file mode 100644 index 0000000..504a05b --- /dev/null +++ b/WebContent/WEB-INF/views/index.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Customer Manager + + +

${message}

+ + \ No newline at end of file diff --git a/src/com/youhubs/customer/CustomerController.java b/src/com/youhubs/customer/CustomerController.java new file mode 100644 index 0000000..cc69a48 --- /dev/null +++ b/src/com/youhubs/customer/CustomerController.java @@ -0,0 +1,17 @@ +package com.youhubs.customer; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +@Controller +public class CustomerController { + + @RequestMapping("/") + public ModelAndView home() { + ModelAndView mv = new ModelAndView("index"); + mv.addObject("message", "Hello from Spring MVC!"); + return mv; + } + +}