亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? exceptionhandler.java

?? 網絡編程技術與實例源碼
?? JAVA
字號:
package org.apache.struts.action;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.Globals;
import org.apache.struts.config.ExceptionConfig;
import org.apache.struts.util.MessageResources;
import org.apache.struts.util.ModuleException;

/**
 * <p>An <strong>ExceptionHandler</strong> is configured in the Struts
 * configuration file to handle a specific type of exception thrown
 * by an <code>Action.execute</code> method.</p>
 * 
 * @since Struts 1.1
 */
public class ExceptionHandler {
    

    /**
     * <p>Commons logging instance.</p>
     */
    private static final Log log = LogFactory.getLog(ExceptionHandler.class);
    

    /**
     * <p>The message resources for this package.</p>
     */
    private static MessageResources messages =
        MessageResources.getMessageResources(
            "org.apache.struts.action.LocalStrings");
    

    /**
     * <p>Handle the <code>Exception</code>.
     * Return the <code>ActionForward</code> instance (if any) returned by
     * the called <code>ExceptionHandler</code>.
     *
     * @param ex The exception to handle
     * @param ae The ExceptionConfig corresponding to the exception
     * @param mapping The ActionMapping we are processing
     * @param formInstance The ActionForm we are processing
     * @param request The servlet request we are processing
     * @param response The servlet response we are creating
     *
     * @exception ServletException if a servlet exception occurs
     *
     * @since Struts 1.1
     */
    public ActionForward execute(
        Exception ex,
        ExceptionConfig ae,
        ActionMapping mapping,
        ActionForm formInstance,
        HttpServletRequest request,
        HttpServletResponse response)
        throws ServletException {

        ActionForward forward = null;
        ActionMessage error = null;
        String property = null;

        // Build the forward from the exception mapping if it exists
        // or from the form input
        if (ae.getPath() != null) {
            forward = new ActionForward(ae.getPath());
        } else {
            forward = mapping.getInputForward();
        }

        // Figure out the error
        if (ex instanceof ModuleException) {
            error = ((ModuleException) ex).getActionMessage();
            property = ((ModuleException) ex).getProperty();
        } else {
            error = new ActionMessage(ae.getKey(), ex.getMessage());
            property = error.getKey();
        }

        this.logException(ex);

        // Store the exception
        request.setAttribute(Globals.EXCEPTION_KEY, ex);
        this.storeException(request, property, error, forward, ae.getScope());

        return forward;

    }


    /**
     * <p>Logs the <code>Exception</code> using commons-logging.</p>
     * @param e The Exception to log.
     * @since Struts 1.2
     */
    protected void logException(Exception e){

        log.debug(messages.getMessage("exception.log"), e);

    }


    /**
     * <p>Default implementation for handling an <code>ActionError</code> generated
     * from an <code>Exception</code> during <code>Action</code> delegation. The default
     * implementation is to set an attribute of the request or session, as
     * defined by the scope provided (the scope from the exception mapping). An
     * <code>ActionErrors</code> instance is created, the error is added to the collection
     * and the collection is set under the <code>Globals.ERROR_KEY</code>.</p>
     *
     * @param request The request we are handling
     * @param property The property name to use for this error
     * @param error The error generated from the exception mapping
     * @param forward The forward generated from the input path (from the form or exception mapping)
     * @param scope The scope of the exception mapping.
     * @deprecated Use storeException(HttpServletRequest, String, ActionMessage, ActionForward, String)
     * instead. This will be removed after Struts 1.2.
     */
    protected void storeException(
        HttpServletRequest request,
        String property,
        ActionError error,
        ActionForward forward,
        String scope) {

        this.storeException(request, property, (ActionMessage) error, forward, scope);
        // :TODO: Remove after Struts 1.2

    }

    /**
     * <p>Default implementation for handling an <code>ActionMessage</code> generated
     * from an <code>Exception</code> during <code>Action</code> delegation. The default
     * implementation is to set an attribute of the request or session, as
     * defined by the scope provided (the scope from the exception mapping). An
     * <code>ActionMessages</code> instance is created, the error is added to the
     * collection and the collection is set under the <code>Globals.ERROR_KEY</code>.</p>
     *
     * @param request The request we are handling
     * @param property The property name to use for this error
     * @param error The error generated from the exception mapping
     * @param forward The forward generated from the input path (from the form or exception mapping)
     * @param scope The scope of the exception mapping.
     * @since Struts 1.2
     */
    protected void storeException(
        HttpServletRequest request,
        String property,
        ActionMessage error,
        ActionForward forward,
        String scope) {

        ActionMessages errors = new ActionMessages();
        errors.add(property, error);

        if ("request".equals(scope)) {
            request.setAttribute(Globals.ERROR_KEY, errors);
        } else {
            request.getSession().setAttribute(Globals.ERROR_KEY, errors);
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩限制级电影在线观看| 欧美日韩dvd在线观看| 麻豆精品国产传媒mv男同| 日本不卡中文字幕| 日韩有码一区二区三区| 日本人妖一区二区| 狠狠狠色丁香婷婷综合久久五月| 久久99精品久久久| 国产精品一区一区| 91无套直看片红桃| 欧美性高清videossexo| 91精品国产综合久久蜜臀| 日韩三级.com| 欧美激情在线看| 亚洲美女淫视频| 婷婷成人综合网| 激情国产一区二区| av电影天堂一区二区在线| 欧美成人精品1314www| 日韩写真欧美这视频| 欧美韩国日本不卡| 亚洲一区在线观看免费| 久久精品免费观看| 色先锋资源久久综合| 日韩三级在线观看| 中文字幕一区二区在线播放| 亚洲自拍偷拍av| 国产一区二区女| 色婷婷av一区| 久久久国产精华| 亚洲一区在线播放| 国产精品99久久久久久久vr| 欧美午夜精品一区| 欧美激情一区二区在线| 午夜av电影一区| 粉嫩欧美一区二区三区高清影视| 欧美三级电影网站| 国产欧美一区二区精品性色| 亚洲国产另类av| a美女胸又www黄视频久久| 欧美一卡二卡在线| 亚洲精品久久7777| 国产在线精品国自产拍免费| 欧美人体做爰大胆视频| 中文字幕在线观看不卡| 五月开心婷婷久久| 日本精品一级二级| 国产精品情趣视频| 国产中文字幕一区| 3atv在线一区二区三区| **网站欧美大片在线观看| 国产一区二区不卡老阿姨| 欧美色精品在线视频| 国产精品久久久久一区| 久久99精品国产麻豆婷婷洗澡| 欧美在线视频你懂得| 亚洲欧美另类小说| 成人av在线电影| 国产婷婷一区二区| 久久精品国产网站| 一本到高清视频免费精品| 久久久一区二区| 久久精品国产99国产精品| 欧美久久久久久蜜桃| 亚洲一区二区视频| 色94色欧美sute亚洲线路一久 | 一区二区三区四区中文字幕| 国产精品99久久久久久久vr| 欧美精品一区二区三| 免费人成黄页网站在线一区二区| 欧美日韩成人综合天天影院| 亚洲另类在线一区| 99久久精品情趣| 国产精品美女久久久久久2018| 国产sm精品调教视频网站| 国产亚洲精品7777| 粉嫩一区二区三区在线看| 欧美国产日韩亚洲一区| 成人性生交大片免费| 国产精品国产三级国产普通话99| youjizz久久| 一区二区不卡在线视频 午夜欧美不卡在| 波多野结衣91| 亚洲国产精品久久久男人的天堂| 在线观看免费视频综合| 视频一区二区国产| 久久综合九色综合欧美亚洲| 国产一区不卡在线| 国产精品国产三级国产aⅴ中文 | 亚洲欧美日韩小说| 日本大香伊一区二区三区| 亚洲高清不卡在线| 精品国产凹凸成av人网站| 国产精品一二二区| 一区二区三区成人| 欧美一区二区三区不卡| 国产精品夜夜嗨| 亚洲精品久久嫩草网站秘色| 7777精品伊人久久久大香线蕉的| 蜜桃av一区二区| 国产精品久久一卡二卡| 欧美伊人久久大香线蕉综合69| 日本v片在线高清不卡在线观看| 精品日韩在线观看| 91同城在线观看| 精品一区二区三区欧美| 国产精品麻豆欧美日韩ww| 欧美精品久久久久久久多人混战| 久久99精品国产麻豆不卡| 国产精品网站在线观看| 7777精品伊人久久久大香线蕉完整版 | 亚洲欧美在线另类| 91精品国产色综合久久ai换脸| 国产成人在线免费| 日韩中文字幕1| 亚洲欧美激情在线| 国产午夜精品一区二区三区视频| 91精彩视频在线| 豆国产96在线|亚洲| 人人狠狠综合久久亚洲| 一区二区三区日韩精品| 久久久久国产一区二区三区四区| 欧美日韩精品免费观看视频| 国产激情精品久久久第一区二区| 亚洲综合一区二区| 日本一二三不卡| 久久伊人中文字幕| 91精品国产综合久久小美女| 在线观看国产91| 成人动漫一区二区三区| 久久99精品久久久| 日韩综合在线视频| 一区二区三区四区在线免费观看| 欧美国产乱子伦 | 亚洲日本va在线观看| 欧美xxx久久| 717成人午夜免费福利电影| 色综合天天视频在线观看| 国产91富婆露脸刺激对白| 国产伦精一区二区三区| 狠狠色综合播放一区二区| 日本亚洲最大的色成网站www| 一区二区三区在线不卡| 亚洲另类在线视频| 亚洲免费av观看| 亚洲乱码国产乱码精品精的特点 | 99re66热这里只有精品3直播 | 天堂影院一区二区| 午夜视频在线观看一区二区| 亚洲二区在线观看| 午夜欧美一区二区三区在线播放| 亚洲综合精品自拍| 香蕉成人伊视频在线观看| 日日夜夜精品视频免费| 亚洲18影院在线观看| 日本亚洲三级在线| 精品一区二区精品| 国产一区999| 99久久精品免费看国产| 日本二三区不卡| 6080yy午夜一二三区久久| 337p亚洲精品色噜噜狠狠| 538prom精品视频线放| 日韩欧美一区在线观看| 精品91自产拍在线观看一区| 日本一区二区三区电影| 亚洲欧美一区二区视频| 亚洲国产精品欧美一二99| 开心九九激情九九欧美日韩精美视频电影| 麻豆精品视频在线| 国产福利一区二区三区在线视频| voyeur盗摄精品| 欧美精品少妇一区二区三区 | 99精品视频中文字幕| 91蜜桃传媒精品久久久一区二区| 欧美优质美女网站| 91精选在线观看| 国产精品沙发午睡系列990531| 亚洲欧美日韩中文播放| 麻豆一区二区三区| www.亚洲人| 欧美一级国产精品| 亚洲欧美怡红院| 另类小说欧美激情| 97成人超碰视| 精品剧情在线观看| 亚洲欧美综合网| 久久99深爱久久99精品| 91浏览器打开| 久久嫩草精品久久久久| 午夜av区久久| 91玉足脚交白嫩脚丫在线播放| 日韩三级.com| 亚洲国产精品久久艾草纯爱| 国产suv精品一区二区883| 91精品国产色综合久久不卡电影| 亚洲欧美视频在线观看| 国产电影一区二区三区| 欧美男生操女生| 亚洲激情六月丁香|