0

I am creating a simple Hello World Application using Tomcat 8 and Spring 4. I've managed to configure my environment and get Tomcat running. I exported my war file and placed it in the (tomcat_home)/webapps directory. I also successfully did a maven build. However, I am getting this error "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists." Here is a screenshot of my project structure

enter image description here

Here is my controller class

package com.crunchify.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class CrunchifyHelloWorld {

    @RequestMapping("/welcome")
    public ModelAndView helloWorld() {

        String message = "<br><div style='text-align:center;'>"
                + "<h3>********** Hello World, Spring MVC Tutorial</h3>This message is coming from CrunchifyHelloWorld.java **********</div><br><br>";
        return new ModelAndView("welcome", "message", message);
    }

}

0 Answers0