web.xml

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  3. <display-name>Struts Blank</display-name>
  4. <filter>
  5. <filter-name>struts2</filter-name>
  6. <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
  7. </filter>
  8. <filter-mapping>
  9. <filter-name>struts2</filter-name>
  10. <url-pattern>/*</url-pattern>
  11. </filter-mapping>
  12. <welcome-file-list>
  13. <welcome-file>index.html</welcome-file>
  14. </welcome-file-list>
  15. </web-app>

struts.xml

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE struts PUBLIC
  3. "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
  4. "http://struts.apache.org/dtds/struts-2.0.dtd">
  5. <struts>
  6. <constant name="struts.enable.DynamicMethodInvocation" value="false" />
  7. <constant name="struts.devMode" value="false" />
  8. <include file="example.xml"/>
  9. <!-- Add packages here -->
  10. </struts>

example.xml

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE struts PUBLIC
  3. "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
  4. "http://struts.apache.org/dtds/struts-2.0.dtd">
  5. <struts>
  6. <package name="example" namespace="/example" extends="struts-default">
  7. <action name="HelloWorld" class="example.HelloWorld">
  8. <result>/example/HelloWorld.jsp</result>
  9. </action>
  10. <action name="Login_*" method="{1}" class="example.Login">
  11. <result name="input">/example/Login.jsp</result>
  12. <result type="redirect-action">Menu</result>
  13. </action>
  14. <action name="*" class="example.ExampleSupport">
  15. <result>/example/{1}.jsp</result>
  16. </action>
  17. <!-- Add actions here -->
  18. </package>
  19. </struts>

转载于:https://blog.51cto.com/const/600416

struts2.0.14 web.xml,struts.xml配置相关推荐

  1. struts2.0.14 包命名空间

    转载于:https://blog.51cto.com/const/602830

  2. struts2配置详解(struts.xml配置详解)

    本文转自:http://www.cnblogs.com/fmricky/archive/2010/05/20/1740479.html struts.xml是我们在开发中利用率最高的文件,也是Stru ...

  3. struts2随笔(一)Action、struts.xml、Interceptor细节

    Struts2由Struts1和webWork两个经典MVC框架发展起来.与传统的Struts1相比,Struts2允许使用不同的Java对象作为Action.支持更多的视图技术,基于AOP思想的拦截 ...

  4. struts2——struts.xml配置文件详解

    文章目录 介绍 一.struts.xml 文件结构 二.常量配置 三.包配置 四.包含配置 介绍 struts.xml 是 Struts2 框架的核心配置文件,该文件主要用于配置 Action 和请求 ...

  5. struts2 的struts.properties配置详解

    Struts 2框架有两个核心配置文件,其中struts.xml文件主要负责管理应用中的Action映射,以及该Action包含的Result定义等.除此之外,Struts 2框架还包含     st ...

  6. Struts 2配置详解

    学习内容 Struts 2配置文件 Action的配置 Result的配置 属性驱动与模型驱动 能力目标 熟练进行Struts 2配置 熟练使用属性驱动和模型驱动 本章简介 上一章我们初步学习了Str ...

  7. Struts2学习笔记(一)--入门常见配置

     Struts2框架的学习路线 l 第一天:Struts2的概述.Struts2的入门.Struts2常见的配置.Struts2的Action的编写 l 第二天:Struts2的数据的封装.结果页面配 ...

  8. struts.properties配置详解

    Struts 2框架有两个核心配置文件,其中struts.xml文件主要负责管理应用中的Action映射,以及该Action包含的Result定义等.除此之外,Struts 2框架还包含struts. ...

  9. Struts2.0第三章(文件上传、ajax开发、json、Fastjson、Jackson、注解开发)

    Struts2.0文件上传: 浏览器端注意事项: 1.表单提交方式method = post: 2.表单中必须有一个<input type="file" name = &qu ...

最新文章

  1. python3教程廖雪峰云-python3基础教程廖雪峰云(如何规划研究生三年最后成为谷歌软件工程师)...
  2. 【翻译】在ruby中实现attributes的lazily initialization(惰性初始化)
  3. 【python】yaml文件操作
  4. WebAPI——浏览器跨域解决方案
  5. 移动端动画使用transform提升性能
  6. 红黑所-1996-2011年中国黑客大事记
  7. Ubuntu系统清理瘦身
  8. MDM数据分析设计方案
  9. ufs2.1 android bench,一加UFS 3.0手机极限测试 对比UFS2.1测评
  10. Flash Magic使用
  11. WKWebView OC与JS交互
  12. mpa和pis_有关压力单位pis
  13. java 亚马逊 mws_使用Amazon Deep Java库进行Java中的机器学习
  14. 微信视频号标题怎么写吸引眼球
  15. vr性能测试软件,VR性能测试
  16. 你上面写的代码用什么编程软件?
  17. WebAPP添加到iOS的桌面
  18. 一个手机游戏服务器的架构
  19. kernal tch 下载 天正_kernal tch 下载 天正_tch kernal.arx
  20. 上海发挥龙头带动作用 推进长三角一体化发展示范区建设

热门文章

  1. 我买了个阿里云服务器并在上面部署了一个项目
  2. iOS6和iOS7适应代码(6) —— NSLocalizedString
  3. 【Latex】数学公式排版
  4. SharePoint2013的头像显示和读取
  5. 无法在PC上找到,android app 创建的文件 问题.
  6. [转载]C#深拷贝的方法
  7. 剑指offer——面试题47:不用加减乘除做加法
  8. 二叉树插入算法的非递归版本
  9. 20160828小结
  10. 维纳滤波的详细讲解(同为小白,相互取暖)