`

struts.xml路径修改后的web配置

 
阅读更多
web.xml配置:
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<init-param>
<param-name>config</param-name>

<!-- 配置装载struts.xml路径-->
<param-value>
/xxx/struts.xml,
struts-default.xml,
struts-plugin.xml
</param-value>
</init-param>
</filter>


其中struts-default.xml,struts-plugin.xml是必须加的,否则会报!
错误信息:No mapping found for dependency[type=com.opensymphony.xwork2.ObjectFactory]
分享到:
评论

相关推荐

    struts2的rest风格插件实例

    由于 Struts 2 的 REST 插件还需要将提供 XML、JSON 格式的数据,因此还需要将 xstream-1.2.2.jar、json-lib-2.1.jar、ezmorph-1.0.3.jar 以及 Jakarta-Common 相关 JAR 包复制到 Web 应用的 WEB-INF/lib 路径下。...

    struts2零配置个人整理文档

    你可以通过设置struts.convention.package.locators属性来修改这个配置。如: &lt;constant name="struts.convention.package.locators" value="web,action" /&gt; 则定义了在项目中,包路径包含web和action的将被视为...

    Struts2属性文件详解

    该属性设置当struts.xml文件改变后,系统是否自动重新加载该文件.该属性的默认值是false. struts.velocity.configfile 该属性指定Velocity框架所需的velocity.properties文件的位置.该属性的默认值为velocity....

    struts2配置2.5版

    拦截器:web.xml 配置拦截器&lt;filter&gt; struts2.5的filter-class 与struts2.5以前版本有所不同 &lt;!-- 浏览器访问 http://localhost:8080/MyWeb/helloworld --&gt; --&gt; &lt;?xml version="1.0" encoding=...

    struts2+spring2+ibates

    3、配置web.xml (分别配置sping,struts) 4、写sping的application和applicationservices或者其它配置.(可对些文件分为其它文件,在web.xml中注册即可) 5、配置struts.xml 6、配置sqlmapconfig.xml,如果有include,则...

    Struts2\constant应用

    -- 当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false(生产环境下使用),开发阶段最好打开 --&gt; &lt;constant name="struts.configuration.xml.reload" value="true" /&gt; &lt;!-- 开发模式下使用...

    Struts in Action中文版

    2.2.4. 用 Struts 开发Web 应用......................................................................................42 2.3. 为什么需要框架.................................................................

    Struts2教程

    由于 Struts 的入口点是 ActionServlet ,所以得在 web.xml 中配置一下这 个 Servlet 。 2. 编写 Action 类(一般从 org.apache.struts.action.Action 类继承)。 3. 编写 ActionForm 类(一般从 org.apache.struts....

    让Struts2可以从classpath及jar中查找jsp文件

    1、把两个类文件加入你的工程或者打包成jar。 2、在你的struts.xml里面包含这个struts-base.xml。 3、参照config.xml改写你的需要从classpath(包括jar文件内)查找...你可以改写这个类,从而在某个地方配置这一路径。

    struts in Action

    2.2.4. 用Struts 开发Web 应用......................................................................................42 2.3. 为什么需要框架...................................................................

    java考试系统

    (C) FilterDispatcher类中的init()方法中将会读取类路径下默认的配置文件struts.xml完成初始化操作 (D) struts2读取到struts.xml的内容后,会将内容封装进Action对象中并存放在内存。 ~ 3.在Struts中提供了多种返回...

    web页面模块化异步渲染struts-gpipe.zip

    struts-gpipe开发的时候尽量考虑到了用户的使用成本,因此将struts-gpipe引入项目配置起来相对还是比较简单的,下面简单介绍一下如何将struts-gpips引入我们的项目:1.web.xml配置   &lt;filter-name&gt;struts2  ...

    struts2注解详细说明

    需要在你项目的struts.xml中添加如下配置    name="struts.convention.action.suffix" value="Controller"/&gt;   name="struts.convention.action.mapAllMatches" value="true"/&gt;   name="struts.convention....

    Myeclipse开发struts+hibernate+spring新手入门--环境配置---项目开发示例

    3、配置struts-config.xml文件;建立action、formbean; 改配置可以自动生成,使用eclipse进行自动生成,在建立时,如下图,可直接生成对应的action类和formbean类。 1 &lt;?xml version="1.0" encoding="UTF-8"?&gt; 2 ...

    Struts2整合SiteMesh技巧

    概述 Struts 2.0提供一个Sitemesh插件... 缺省情况下,sitemesh假定装饰器文件保存在应用上下文根路径下的decorators目录下,如果采用如上配置,装饰器文件应该是ftl格式,如果需要使用其他格式,需要更改过滤器配置。

    Struts2注解使用说明文档

    struts2不再推荐使用Codebehind作为零配置插件,而是改为使用Convention插件来支持零配置,和Codebehind相比,Convention插件更彻底,该插件完全抛弃配置信息,不仅不需要是使用struts.xml文件进行配置,甚至不需要...

    三大框架整合源代码

    3.struts和hibernate全部交由spring来管理,所以不需要使用hibernate.cfg.xml以及entity.hbh.xml文件 4.框架全部使用注解来完成 5.完成功能有:事物配置,日志输出,单元测试,分页组建,baseDao的实现等等 6.所有...

    Eclipse上搭建并开始Struts的入门项目

    将lib目录下的所有jar包复制粘贴到刚刚创建的项目的WebContent/WEB-INF/lib目录下,在该目录下选中所有jar包后,右击添加至构建路径,英文版Build Path-&gt;Add Build Path 1.3.4、struts.xml编写 在src目录下,新建...

    SpringStrutsHibernate的配置

    Servlet必须在:项目名\WebRoot\WEB-INF这个目录下面的web.xml文件进行配置。改变web.xml的默认文件名:(一般默认引入的文件名,我们不改) http://blog.csdn.net/qq413041153/article/details/7922961 ...

    Struts2.0_Hibernate3_spring2.0 实现用户注册

    Struts2.0_Hibernate3_spring2.0 部署Web应用请按如下步骤进行: 1. 进入reg_login路径下,将mysql.sql脚本中的语句导入MySQL数据库。 2. 修改reg_login\WEB-INF路径下的applicationContext.xml文件,将其中的...

Global site tag (gtag.js) - Google Analytics