Struts2 WEB项目启动时候的三个xml文件

本文详细解读了使用Tomcat部署Struts2Web项目时的日志信息,包括核心配置文件、插件配置及自定义配置的解析过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用tomcat部署struts2 web项目时候,在日志中:


信息: Parsing configuration file [struts-default.xml]
2014-3-19 0:50:17 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2014-3-19 0:50:17 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts-plugin.xml]
2014-3-19 0:50:18 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
信息: Parsing configuration file [struts.xml]
2014-3-19 0:50:18 org.apache.struts2.config.AbstractBeanSelectionProvider info


1.struts-default.xml

只读文件,是struts的核心配置文件

2.struts-plugin.xml

框架中使用到的插件,通常在struts lib 目录下面以plugin结尾的jar包。

比如json,配置文件如下:


<struts>
    <package name="json-default" extends="struts-default">

        <result-types>
            <result-type name="json" class="org.apache.struts2.json.JSONResult"/>
        </result-types>

        <interceptors>

3.struts.xml

自己定义的配置文件,自己定义的Action,拦截器等。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值