j2ee问题

来源:百度知道 编辑:UC知道 时间:2024/05/14 16:44:02
struts-config.xml中的代码
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcesor">
</controller>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="WEB-INF/classes/applicationContext.xml"/>
</plug-in>
和web.xml中的
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>代码冲突吗?解释一下,谢谢
那为什么我在整合一个ssh项目时候,两者都加入总是提示
404错误action Servlet is not available但是我将前者去掉,但在web.xml文件中加入<resource-ref>
<description>mysql</description>
<res-ref-name>jdbc/mldn</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
&l

不会冲突 ,后者是在服务器启动时就加载了,用spring的管理机制代替了Struts管理机制。前者是在调用struts控制器时 spring的管理机制对原有的进行替换的。如果都加上,按前者执行。