-1

I am following this sample, spring boot MVC + JSP...http://www.leveluplunch.com/java/tutorials/003-getting-started-with-spring-boot/

it works great in eclipse, but, when i make the deploy (mvn install) and java -jar at JAR file... i use this link http://localhost:8080/jsptest.... and go to 404.

there is some rules for JSP in spring boot MVC?

the app is simple...and work on eclipse, but the jar does´t.

some idea?

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
  • 1
    the error was the JAR... a spring boot + JSP app must be deployed on WAR. y edit the POM with `code` war org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat provided `code` – Waldo Vasquez May 27 '15 at 21:50
  • and in the Procfile i used the "web: java -Dserver.port=$PORT -jar target/003-getting-started-with-spring-boot-0.0.1-SNAPSHOT.war" – Waldo Vasquez May 28 '15 at 00:41

1 Answers1

0

404 means resource not available.

Typical troubleshooting includes:

1) Check your spring boot server status. Did it start without any errors?

2) check available mappings at localhost:8080/mappings. Did you see your mapping on that page?

3) When you access the URL what happens in the log file?

4) When you say it works fine in eclipse, did you deploy it to any server? or did you run it from command line? And try to find out the difference between eclipse launch configuration and java -jar launch configuration.

K139
  • 3,654
  • 13
  • 17
  • thanks by the help, when i say it works fine in eclipse, means who i ran the code in eclipse using "run as" -->"spring boot App"... and every thing is all right the link localhost:8080/jsptest works. after that, i try to build (mvn install) without problems i try to run (java -jar) and in the explorer the link localhost:8080/jsptest it give me 404 – Waldo Vasquez May 27 '15 at 20:46