关于resin的一个错误,Resin 启动报错,访问页面500

背景

客户集成javaagent报错,客户用的是resin,在本地复现问题,修改了bug,其中在resin中发布war包遇到的错误。

完整错误

500
[show] WEB-INF/web.xml:5: <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"> is an unexpected top-level tag.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xm

解决办法

----------------原文件--------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
----------------修改为--------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

参考文章:https://fireinwind.iteye.com/blog/791210

上一篇:TF项目实战(基于SSD目标检测)——人脸检测1


下一篇:Shell简介:1分钟理解什么是Shell 脚本语言 解释器 以及编译器和编译语言