Reputation: 65
I know that this question had been asked before. But none of the previous answers apply to my case. I am using gradle and spring boot. When I use
gradlew bootRun
everything is OK. But when I use
gradlew clean build && java -jar build\libs\myjar.jar
I get the following error when I open my jsp files
The absolute uri: http://www.springframework.org/tags cannot be resolved in either web.xml or the jar files deployed with this application
What is the difference between bootRun and clean build && java -jar? If there is a problem in my build.gradle then how come bootRun runs successfully? Thanks for your answers.
Upvotes: 0
Views: 5558
Reputation: 58114
In short: the classloader is different. There are some limitations to using JSP with Spring Boot embedded applications. especially taglibs. In particular it never works with Jetty. Tomcat should be OK if you stick to a WAR format. If I were you I'd stay away from JSP, as there are so many better ways to write a view layer now.
Upvotes: 2