<?xml version="1.0" encoding="GBK"?>

<!--指定 Struts2 的DTD信息 DTD 指 Document Type Defined-->

<!DOCTYPE = struts PUBLIC

  "-//Apache Software Foundation//DTD Struts Configation 2.0//EN"

  "http://stuts.apache.org/dtds/struts-2.0.dtd">

<struts>

  <!-- 配置国际化资源常量,指定国际化资源文件的baseName 为 messageResource-->

  <constant name = "struts.custom.il8n.resources" value = "message Reasource"/>

  <!--下面配置名为lee的包,该包继承了Struts2的默认包-->

  <package name="lee" extends="struts-default">

  <!-- 配置一个名为Login的Action-->

  <action name="Login" class="lee.LoginAction">

    <result name="input">/login.jsp</result>

    <result name="success">/success.jsp</result>

    <result name="error">/error.jsp</result>

  </action>

  </package>

  <!--下面配置名为get的包,该包继承了Struts2的默认包。指定该包的命名空间为/book-->

  <package name="get" extends="struts-default" namespace="/book">

    <!--配置一个名为GetBook的Action-->

    <action name="GetBook" class="lee.GetBooksAction">

      <result name="login">/login.jsp</result>

      <result name="success">/success.jsp</result>

    </action>

  </package>

</struts>

Struts2 struts.xml配置的更多相关文章

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

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

  2. struts2.1.6教程二、struts.xml配置及例程

    1.配置文件的优先级 在struts2中一些配置(比如常量)可以同时在struts-default.xml(只读性),strtus-plguin.xml(只读性),struts.xml,struts. ...

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

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

  4. struts2 的struts.xml配置详解

    在应用struts框架进行开发时,必不可少的一步就是对struts.xml进行配置,对于该文件了解越多,我们开发起一应用程序定会更加顺手.下面我们看一下struts.xml的内容,每一项都有什么作用. ...

  5. 路径名称和struts.xml配置不一致导致struts2报404

    struts.xml中写的是<result name="...">authorityInterceptor/xxx.jsp</result> 但是实际的文件 ...

  6. struts.xml配置详解 内部资料 请勿转载 谢谢合作

    1.<include> 利用include标签,可以将一个struts.xml配置文件分割成多个配置文件,然后在struts.xml中使用<include>标签引入其他配置文件 ...

  7. struts.xml配置

    1. package标签 package:完成有业务相关的Action(应用控制器的)管理 name:给包起的名字(反映该包中Action的功能),用来完成包和包之间的继承.默认继承struts-de ...

  8. struts.xml配置详解

    struts.xml是我们在开发中利用率最高的文件,也是Struts2中最重要的配置文件. 一下分别介绍一下几个struts.xml中常用到的标签 1.<include> 利用includ ...

  9. Struts2 Struts.xml DTD 说明

    转自:http://blog.csdn.net/cuixiuqin1954/article/details/4228741 关于Struts2中的核心配置文件struts.xml,就其DTD(Docu ...

随机推荐

  1. STM32内置参照电压的使用(转)

    源:STM32内置参照电压的使用 每个STM32芯片都有一个内部的参照电压,相当于一个标准电压测量点,在芯片内部连接到ADC1的通道17. 根据数据手册中的数据,这个参照电压的典型值是1.20V,最小 ...

  2. 2、手把手教你Extjs5(二)项目中文件的加载过程

    上一节中用sencha工具自动创建了一个项目,并且可以在浏览器中查看.现在我们来看看js类加载过程.如下图所示: 1、首先:浏览器中输入 localhost:1841 ,调用 index.html; ...

  3. MySQL 表的命令

    1.查看表的结构: desc 表名; show columns from 表名; describe 表名; show create table 表名; 2.修改表名 rename table 原表名 ...

  4. ucos移植指南

    指定堆栈数据类型(宽度) typedef unsigned int OS_STK; 指定Ucos移植方法3中保存cpu状态寄存器的变量的宽度 typedef unsigned int OS_CPU_S ...

  5. angular登录状态检查

    待补充!!!!!!!!!!! 参加链接: http://www.brafox.com/post/2015/javascript/angularjs/angularjs-router-intercept ...

  6. VMWare虚拟机bridged、host-only和NAT网络模式的区别和用法

    VMWare提供了三种工作模式,它们是bridged(bridged 模式).NAT( 网络地址转换模式)和host-only(主机模式) . 1  VMWare虚拟机bridged.host-onl ...

  7. 如何用 Git 合并两个库,并保留提交历史

    转载自 https://segmentfault.com/a/1190000000678808 背景 一个中型规模项目,开始规划时就打算采用 C/S 架构,后端是单纯的 API 服务,前端在 Web ...

  8. win7下sublime text3 安装Emmet的pyv8

    1.通过快捷键 ctrl+` 或者 View > Show Console 菜单打开控制台 2.适用于 Sublime Text 3: import urllib.request,os;pf=' ...

  9. leetcode day6

    [13]Roman to Integer Given a roman numeral, convert it to an integer. Input is guaranteed to be with ...

  10. Cookie 简单使用记录浏览记录

    ItemsDAO.java package dao; import java.util.* ; import java.sql.* ; import util.DBHelper; import ent ...