<?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. uWSGI, Gunicorn, 啥玩意儿?

    因为nginx等优秀的开源项目,有不少本来不是做服务器的同学也可以写很多服务器端的程序了.但是在聊天中会发现,大家虽然写了不少代码,但是对wsgi是什么,gunicorn是什么,反向代理又是什么并不了 ...

  2. Celery 在Windows下启动worker时出现错误:ValueError: not enough values to unpack (expected 3, got 0)

    在公司Linux环境下没有出现问题,在回到家后直接在Windows10下运行出现错误: ValueError: not enough values to unpack (expected 3, got ...

  3. 【Linux】【Tomcat】Tomcat的安装和配置等

    安装环境 :Linux(Ubuntu 版) 安装软件 : apache-tomcat-9.0.0.M1.tar.gz(下载地址http://tomcat.apache.org/) 步骤一 Tomcat ...

  4. uva-10487-枚举

    题意:给你一个集合,每俩个数相加得到一个和s,输入s1,问离s1最近的s是多少 二分,注意如果二分出相等,那一定是最近的数,要不然就比较最后mid和mid-1的数 #include <strin ...

  5. Java-1.6-并发包-集合

    List相关 对于List并发包就只扩展了一个CopyOnWriteArrayList<E> Set相关 对于Set,并发包扩展ConcurrentSkipListSet<E> ...

  6. 为啥我做的RFM模型被人说做错了,我错哪了?

    本文转自知乎 作者:接地气的陈老师 ————————————————————————————————————————————————————— 有同学问:“为啥我做的RFM模型被客户/业务部门批斗,说 ...

  7. 38.纯 CSS 创作阶梯文字特效

    原文地址:https://segmentfault.com/a/1190000015107942 HTML code: <div class="container"> ...

  8. 21纯 CSS 创作文本滑动特效的 UI 界面

    原文地址:https://segmentfault.com/a/1190000014842868 简化版地址:https://scrimba.com/c/cgaZLh6 感想:笨蛋,想不出自己的东西. ...

  9. koltin语言学习(一)——什么是koltin

    转自:Koltin China (一) 介绍 #Kotlin-for-Android-Dev 1. 什么是Kotlin? Kotlin是JetBrains开发的基于JVM的语言.Kotlin是使用Ja ...

  10. PHP + Apache 在 Linux(centos7)系统下的环境搭建,基于 yum

    (本文采用的是 Centos7 的操作系统,简单起见,以下全部采用 yum 安装,有这么好用的东西为什么要自己去一个一个编译呢) 1, 安装 Apache  => yum -y install ...