【发布时间】:2020-09-11 06:14:40
【问题描述】:
我有一个使用 spring-boot-starter-web 工件创建的 Spring Boot Web 应用程序。我正在使用 Spring Boot Embedded Servlet Containers 功能来使用 Tomcat 嵌入式服务器。我能够在 Tomcat 嵌入式模式下运行我的应用程序。我还可以创建我的应用程序的 WAR 文件并将其部署到 Tomcat 的正常安装中。
我有一个使用log4j2's JSP taglib 标签的JSP 页面。在 Tomcat 的正常安装中,来自该 JSP 页面的日志记录按预期工作。但是当在 Tomcat 嵌入式服务器上 bootRun 我得到以下错误
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [The absolute uri: [http://logging.apache.org/log4j/tld/log] cannot be resolved in either web.xml or the jar files deployed with this application] with root cause
org.apache.jasper.JasperException: The absolute uri: [http://logging.apache.org/log4j/tld/log] cannot be resolved in either web.xml or the jar files deployed with this application
这个问题能解决吗?
【问题讨论】:
-
我不清楚到底是什么问题。你能分享一个最小的、可重现的例子吗?
-
安迪,我确实在github.com/rahulkhimasia/SpringBootLog4j2Taglib.git创建了一个小示例项目
标签: spring-boot log4j2