[英]The absolute uri: http://www.springframework.org/tags cannot be resolved in either web.xml or the jar files deployed with this application
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.
我正在使用gradle和spring boot。 When I use
当我使用
gradlew bootRun gradlew bootRun
everything is OK. 一切都好。 But when I use
但是当我使用
gradlew clean build && java -jar build\\libs\\myjar.jar gradlew clean build && java -jar build \\ libs \\ myjar.jar
I get the following error when I open my jsp files 打开jsp文件时出现以下错误
The absolute uri: http://www.springframework.org/tags cannot be resolved in either web.xml or the jar files deployed with this application 绝对uri: http : //www.springframework.org/tags不能在web.xml或与此应用程序一起部署的jar文件中解析
What is the difference between bootRun and clean build && java -jar? bootRun和clean build && java -jar有什么区别? If there is a problem in my build.gradle then how come bootRun runs successfully?
如果我的build.gradle中有问题,那么bootRun如何成功运行? Thanks for your answers.
感谢您的回答。
In short: the classloader is different. 简而言之:类加载器是不同的。 There are some limitations to using JSP with Spring Boot embedded applications.
将JSP与Spring Boot嵌入式应用程序一起使用存在一些限制 。 especially taglibs.
特别是taglibs。 In particular it never works with Jetty.
特别是,它永远不会与Jetty一起使用。 Tomcat should be OK if you stick to a WAR format.
如果坚持使用WAR格式,Tomcat应该可以。 If I were you I'd stay away from JSP, as there are so many better ways to write a view layer now.
如果您是我,那么我将远离JSP,因为现在有很多更好的方法来编写视图层。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.