I am new to spring and trying to build a simple application. I have a simple html page(home.html) which gets called from Homecontroller.
@Controller public class HomeController { @GetMapping("/") public String home(){ return "home"; } }
when i am trying to access localhost:8080 i cant see my html page instead i see the apache tomcat welcome page which shows – If you are seeing this page you have successfully installed Tomcat
what could be the reason for this? any help will be appreciated
Advertisement
Answer
In tomcat you need to specify the your app name http://localhost:8080/yourappname
.
Here the app name is the name of .war file.