zoukankan      html  css  js  c++  java
  • Struts2框架拦截器:

    Struts 2框架提供了良好的预配置,并准备使用的盒拦截。下面列出了几个重要的拦截器:

    SNInterceptor & 描述
    1 alias
    Allows parameters to have different name aliases across requests.
    2 checkbox
    Assists in managing check boxes by adding a parameter value of false for check boxes that are not checked.
    3 conversionError
    Places error information from converting strings to parameter types into the action's field errors.
    4 createSession
    Automatically creates an HTTP session if one does not already exist.
    5 debugging
    Provides several different debugging screens to the developer.
    6 execAndWait
    Sends the user to an intermediary waiting page while the action executes in the background.
    7 exception
    Maps exceptions that are thrown from an action to a result, allowing automatic exception handling via redirection.
    8 fileUpload
    Facilitates easy file uploading.
    9 i18n
    Keeps track of the selected locale during a user's session.
    10 logger
    Provides simple logging by outputting the name of the action being executed.
    11 params
    Sets the request parameters on the action.
    12 prepare
    This is typically used to do pre-processing work, such as setup database connections.
    13 profile
    Allows simple profiling information to be logged for actions.
    14 scope
    Stores and retrieves the action's state in the session or application scope.
    15 ServletConfig
    Provides the action with access to various servlet-based information.
    16 timer
    Provides simple profiling information in the form of how long the action takes to execute.
    17 token
    Checks the action for a valid token to prevent duplicate formsubmission.
    18 validation
    Provides validation support for actions

    完整的细节上面提到的拦截,请loook到Struts2文档。但我会告诉你如何使用拦截器,一般在你的Struts应用程序。

  • 相关阅读:
    挂载镜像光盘
    源码安装三部曲
    yum和rpm工具使用
    查看软件 有哪些文件
    国内软件源地址
    python代码中碰到的问题及解决 凯
    python之编写登陆接口(第一天) 凯
    python学习笔记之基础二(第二天) 凯
    python学习笔记之基础一(第一天) 凯
    window7下安装第三方包报错及解决 凯
  • 原文地址:https://www.cnblogs.com/borter/p/9502144.html
Copyright © 2011-2022 走看看