在没有连接网络的环境下,启动Tomcat提示如下错误:
-Can't create Tiles definition factory for module ''.
Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
javax.servlet.ServletException: IO Error while parsing file '/WEB-INF/tiles-defs.xml'. jakarta.apache.org
原因是 tiles-defs.xml 中的 tiles-config_1_3.dtd 地址是来自网络,而非本地的。可以将其修改为本地:
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
"../webapps/项目名/WEB-INF/tiles-config_1_3.dtd">
即可。
本文介绍了在离线环境中启动Tomcat遇到的特定错误,并详细解释了导致该问题的原因及解决方案。错误信息显示与tiles-defs.xml文件中的tiles-config_1_3.dtd远程依赖有关。通过将DTD文件的引用更改为本地路径,可以成功解决此问题。
621

被折叠的 条评论
为什么被折叠?



