Spring 如何读取 jar包中的 applicationContext-*.xml文件 很郁闷啊 搞了我两天了 classpath*:applicationContext-*.xml只能读取到当前项目中的文件可jar中文件就是拿不到...找了两天资料都没发现实用的 真郁闷大家帮帮忙了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.如果你是采用三大框架做的,就可以将<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/></plug-in>放入到struts-config.xml中,再不行就把包Spring的包全部看看2.我建议你重新生成项目 我是希望在 <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:applicationContext-*.xml</param-value> </context-param>中 拿到我jar包中的applicationContext.xml文件问题是这个要怎么写? 你把它拿出来,放到classpath里 在web.xml文件中 <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:applicationContext-*.xml,/WEB-INF/applicationContext-*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>struts-config.xml文件中 <!-- 增加用户信息 --> <action path="/regist" type="org.springframework.web.struts.DelegatingActionProxy" name="userForm" parameter="insertUser" scope="request" > <forward name="success" path="/regist.jsp"></forward> </action> borderLayout布局为何不能居中按钮 求租ajax返回的如下数据该如何展示出来!!! 如何用dwr来实现登录!!! java要学习的核心的东西是什么? 有研究过java版开源统计分析没的,我有个,欢迎交流,有API及JAR包。 java mysql的问题 Vector怎么进行分页?? 关于java调用dll的问题 请行家讲解一下,什么是struts 求您给一个ejb和数据库打交道的便子,谢了! 解析XML问题 关于Java的深入学习~~~~~~
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
</plug-in>
放入到struts-config.xml中,再不行就把
包Spring的包全部看看
2.我建议你重新生成项目
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext-*.xml</param-value>
</context-param>
中 拿到
我jar包中的applicationContext.xml文件
问题是这个要怎么写?
在web.xml文件中
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext-*.xml,/WEB-INF/applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>struts-config.xml文件中
<!-- 增加用户信息 -->
<action path="/regist"
type="org.springframework.web.struts.DelegatingActionProxy"
name="userForm"
parameter="insertUser"
scope="request"
>
<forward name="success" path="/regist.jsp"></forward>
</action>