springspring-mvcviewport-number

Spring MVC doesn't find views after changing port 8080 to 80


I have a tomcat8-spring project. The project works good in HTTP or HTTPS.

To get it working with HTTPS, I had to change in servers.xml the port from 8080 to 80. Now, HTML/JSP pages that were found before are now not being found, and Spring MVC throws 404.

My JSP's are now in src\main\webapp\WEB-INF\views. I tried adding methods in the Controller that return the name of the JSP, but it didn't work. I tried Changing WEB-INF to WebContent and that also didn't work.

Where should my JSP's be? What address should I use to access them?


Solution

  • If it interest those who reads - You can tell tomcat to display webpages. In your @RequestMapping in the controller, simply return the name and address of the HTML/JSP/JS/... page you want to display.