文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > Struts2国际化
侵权投诉

Struts2国际化

Struts2国际化

器、Action和Result),可以调用invocation.invoke()。如果要终止后续的执行,可以直接返回一个结果码,框架将根据这个结果码来呈现对应的结果视图。 自定义简单拦截器步骤如下: 步骤一:创建一个MyInterceptor类,此类去实现Interceptor接口 package org.nf.util; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; public class MyInterceptor implements Interceptor { @Override public void destroy() { System.out.println("============销毁"); } @Override public void init() { System.out.println("============初始化"); } @Override public String intercept(ActionInvocation invocation) throws Exception { System.out.println("============调用方法之前"); String result = invocation.invoke(); System.out.println("============调用方法之后"); return result; } } 步骤二、struts.xml中配置

<!-- 定义拦截器 -->

<interceptors>

<interceptor name="myInterceptor"

class="org.nf.util.MyInterceptor"/>

</interceptors>

<action name="stu" class="org.nf.action.StudentAction">

<!-- 引入拦截器 --> <interceptor-ref name="myInterceptor"/> <result>/showInfo.jsp</result> <result name="input">index.jsp</result>

</action>

拦截器栈

上一页第5页

你可能喜欢

热门文档

相关文档

  • struts2国际化详解

    命令的使用方式如下: native2ascii 源文件.properties 目标文件.properties 配置全局资源与输出国际化信息 当准备好资源文件之后, 我们可以在 struts.xml 中通过 struts...

  • struts2支持国际化

    <constant name="struts.custom.i18n.resources" value="message"></constant> 其中的 message 就是国际化资源文件的 baseNmae。 我们先看看简单的在 jsp 中进行...

  • Struts2国际化

    Struts2国际化_IT/计算机_专业资料。Struts2国际化国际化:定义国际化资源文件:资源文件查找顺序:同时存在资源文件、类文件将以类文件为主,而不会调用资源文件。简 ...

  • struts2 国际化

    struts2 国际化_计算机软件及应用_IT/计算机_专业资料。帮助你理解Struts2国际化Sturts2 的国际化支持 strutsstruts2国际化 每种框价都会有国际化的支持,struts2的...

  • Struts2国际化

    Struts2 国际化 I18n---internationalization Struts2 国际化原理 国际化和本地化指让产品(比如软件、出版物等)能够适应非本地环境,特别是其他的 语言和文化。程序...

  • struts2国际化配置

    struts2国际化配置_计算机软件及应用_IT/计算机_专业资料。struts2国际化配置s t rut s 2的国际化!配置心得 的国际化!配置心得2009-12-31 13:56 struts2的国...

  • struts2国际化配置

    struts2国际化配置_IT/计算机_专业资料。struts2国际化配置前提条件:strut2 的必须架包已经引入,struts2 的配置文件全部配置完成 1.首先创建一个 struts.properties...

  • struts2国际化

    struts2国际化_IT/计算机_专业资料。j2ee strutswww.ascenttech.com.cn Struts2.0国际化中国北京: 电话:(010) 82780848/62969799 地址:北京市海淀区创业中路36号...

  • struts2国际化的配置例子

    struts2国际化的配置例子_计算机软件及应用_IT/计算机_专业资料。在 struts2 中,端页面表示国际化的实现更加简单。单的应用 struts2 前简 提供的支持国际化的表达...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email