<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC         "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"         "http://struts.apache.org/dtds/struts-2.5.dtd"> <struts>     <constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />  <constant name="struts.enable.DynamicMethodInvocation" value="false" />  <constant name="struts.devMode" value="true"></constant>  <constant name="struts.action.extension" value="action"></constant>

<package name="all" namespace="/" extends="json-default,struts-default">   <!-- 不加这句 2.1以上的Struts 不能使用通配符 -->   <global-allowed-methods>regex:.*</global-allowed-methods>   <!-- 所有ACTION -->   <action name="*_*" class="action.{1}Action" method="{2}">    <result type="json" name="map">     <param name="root">dataMap</param>    </result>

<result type="json" name="list">     <param name="root">dataList</param>    </result>

<result type="json" name="json">     <param name="root">dataJson</param>    </result>

<!-- 明文    <result type="plainText" name="str">     <param name="root">dataStr</param>    </result> -->

<!-- 流 -->    <result type="stream" name="stream">     <param name="root">dataStream</param>    </result>

<result type="postback" name="postback">     <param name="root">datapostback</param>    </result>

</action>  </package>

</struts>

/src/struts.xml的更多相关文章

  1. struts2学习笔记--struts.xml配置文件详解

    这一节主要讲解struts2里面的struts.xml的常用标签及作用: 解决乱码问题 <constant name="struts.i18n.encoding" value ...

  2. Struts2(一):怎么创建对应版本的struts.xml

    1.eclisep导航菜单:windows->preferences->Xml->Xml Catalog; 2.在Xml Catalog右侧,添加一个新的XML Catalog: 3 ...

  3. Struts.xml讲解

    解决在断网环境下,配置文件无提示的问题我们可以看到Struts.xml在断网的情况下,前面有一个叹号,这时,我们按alt+/ 没有提示,这是因为” http://struts.apache.org/d ...

  4. Struts2笔记——struts.xml配置详解

    访问HelloWorld应用的路径的设置 * 在struts1中,通过<action path=“/primer/helloWorldAction.action”>节点的path属性指定访 ...

  5. struts2中改变struts.xml默认路径

    struts2.X配置文件默认存放路径在/WEB-INF/classes目录下,即将struts.xml放在src的目录下. 但是为了方便管理,开发人员把struts.xml放到其他位置,处理方法如下 ...

  6. struts2——配置struts.xml文件

    在struts2框架中struts.xml是应当放到src的根目录,程序编译后会将struts.xml放到WEB-INF/classes目录下. Struts2在web.xml中的一般配置如下: &l ...

  7. struts2 + jquery 开发环境下的ajax构建方法(action写法 + struts.xml配置 + js调用代码)

    1.action写法 public class RegisterAction extends ActionSupport { private InputStream inputStream; /** ...

  8. Struts2更改配置文件struts.xml默认路径

    struts2配置文件默认存放路径在/WEB-INF/classes目录下,即将struts.xml放在src的目录下. 但是为了协作开发与方便管理,我们有时需要把struts.xml放到其他位置 s ...

  9. struts2中struts.xml 放置路径的问题

    在搭建struts2项目时如果在web.xml中不指定struts.xml文件的路径,struts2会默认到/WEB-INF/classes中寻找加载其配置文件的,但我就是想把struts的配置文件放 ...

随机推荐

  1. 数据库数据以Excel的方式导出

    import java.io.Serializable; import java.util.List; import com.cfets.cwap.s.util.db.TableColumn; /** ...

  2. gentoo moc audacious

    最近想在 gentoo 上面听音乐, 以前用过 audacious,现在想换成 moc 试试看. emerge -av moc,结果安装完了以后,放 mp3 没有声音,把 USE 里面各种相关解码的都 ...

  3. Freemarker入门

    Freemarker入门 工程引入依赖 <dependency> <groupId>org.freemarker</groupId> <artifactId& ...

  4. Kettle入门

    kettle  水壶 正如其名“水壶”,将各个地方的水倒进水壶里,再用水壶倒入不同的容器. 勺子-Spoon.bat/spoon.sh 图形界面工具,就是启动上图主界面的命令行. ketchen 厨房 ...

  5. Mysql 储存引擎

    查看当前版本支持哪些储存引擎 mysql> show engines; InnoDB 支持事务机制 : 保证操作安全性 行级锁定 : 开销大,加锁慢:会出现死锁:锁定粒度最小,发生锁冲突的概率最 ...

  6. TP5 模型事务操作

    注意:数据只要涉及多表一致性操作,必须要开启数据库事务操作 ThinkPHP5 中模型层中使用事务: try{ $this->startTrans(); $this->data($orde ...

  7. 关闭win10 自动更新 及蓝屏解决办法

    "控制面板-管理工具-服务"(或在"此电脑"鼠标右键,点击"管理"),找到Windows Update项目后,将"启动类型&quo ...

  8. crontab使用说明及例子程序

    http://blog.csdn.net/yygydjkthh/article/details/7845639 http://walkerqt.blog.51cto.com/1310630/16901 ...

  9. jsp不解析el表达式,不识别jstl标签,找不到http://java.sun.com/jsp/jstl/core

    问题描述: jsp页面中el表达式,例如:${pageContext.request.contextPath},原样呈现,未被解析. 解决方案: 为jsp页添加page指令如下: <%@ pag ...

  10. Arraylist JDk1.8扩容和遍历

    Arraylist作为最简单的集合,需要熟悉一点,记录一下---->这边主要是注意一下扩容和遍历的过程 请看以下代码 public static void main(String[] args) ...