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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? eventactiondispatcher.java

?? struts的源代碼
?? JAVA
字號(hào):
/*
 * $Id: EventActionDispatcher.java 384134 2006-03-08 06:43:55Z niallp $
 *
 * Copyright 2006 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.struts.actions;

import java.util.StringTokenizer;
import java.lang.reflect.Method;

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.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;

/**
 * <p>An Action helper class that dispatches to to one of the public methods
 * that are named in the <code>parameter</code> attribute of the corresponding
 * ActionMapping and matches a submission parameter. This is useful for
 * developers who prefer to use many submit buttons, images, or submit links
 * on a single form and whose related actions exist in a single Action class.</p>
 *
 * <p>The method(s) in the associated <code>Action</code> must have the same
 * signature (other than method name) of the standard Action.execute method.</p>
 *
 * <p>To configure the use of this action in your
 * <code>struts-config.xml</code> file, create an entry like this:</p>
 *
 * <pre><code>
 *   &lt;action path="/saveSubscription"
 *           type="org.example.SubscriptionAction"
 *           name="subscriptionForm"
 *          scope="request"
 *          input="/subscription.jsp"
 *      parameter="save,back,recalc=recalculate,default=save"/&gt;
 * </code></pre>
 *
 * <p>where <code>parameter</code> contains three possible methods and one
 * default method if nothing matches (such as the user pressing the enter key).</p>
 *
 * <p>For utility purposes, you can use the <code>key=value</code> notation to
 * alias methods so that they are exposed as different form element names, in the
 * event of a naming conflict or otherwise. In this example, the <em>recalc</em>
 * button (via a request parameter) will invoke the <code>recalculate</code>
 * method. The security-minded person may find this feature valuable to
 * obfuscate and not expose the methods.</p>
 *
 * <p>The <em>default</em> key is purely optional. If this is not specified
 * and no parameters match the list of method keys, <code>null</code> is
 * returned which means the <code>unspecified</code> method will be invoked.</p>
 *
 * <p>The order of the parameters are guaranteed to be iterated in the order
 * specified. If multiple buttons were accidently submitted, the first match in
 * the list will be dispatched.</p>
 *
 * <p>To implement this <i>dispatch</i> behaviour in an <code>Action</code>,
 * class create your custom Action as follows, along with the methods you require
 * (and optionally "cancelled" and "unspecified" methods):</p> <p/>
 * <pre>
 *   public class MyCustomAction extends Action {
 *
 *       protected ActionDispatcher dispatcher = new EventActionDispatcher(this);
 *
 *       public ActionForward execute(ActionMapping mapping,
 *                                    ActionForm form,
 *                                    HttpServletRequest request,
 *                                    HttpServletResponse response)
 *                           throws Exception {
 *           return dispatcher.execute(mapping, form, request, response);
 *       }
 *   }
 * </pre>
 * <p/>
 *
 * @since Struts 1.2.9
 */
public class EventActionDispatcher extends ActionDispatcher {

    /**
     * Commons Logging instance.
     */
    private static final Log LOG = LogFactory.getLog(EventActionDispatcher.class);

    /**
     * The method key, if present, to use if other specified method keys
     * do not match a request parameter.
     */
    private static final String DEFAULT_METHOD_KEY = "default";

    /**
     * Constructs a new object for the specified action.
     * @param action the action
     */
    public EventActionDispatcher(Action action) {
        // N.B. MAPPING_FLAVOR causes the getParameter() method
        //      in ActionDispatcher to throw an exception if the
        //      parameter is missing
        super(action, ActionDispatcher.MAPPING_FLAVOR);
    }

    /**
     * <p>Dispatches to the target class' <code>unspecified</code> method, if
     * present, otherwise throws a ServletException. Classes utilizing
     * <code>EventActionDispatcher</code> should provide an <code>unspecified</code>
     * method if they wish to provide behavior different than throwing a
     * ServletException.</p>
     *
     * @param mapping  The ActionMapping used to select this instance
     * @param form     The optional ActionForm bean for this request (if any)
     * @param request  The non-HTTP request we are processing
     * @param response The non-HTTP response we are creating
     * @return The forward to which control should be transferred, or
     *         <code>null</code> if the response has been completed.
     * @throws Exception if the application business logic throws an
     *                   exception.
     */
    protected ActionForward unspecified(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {
        // Identify if there is an "unspecified" method to be dispatched to
        String name = "unspecified";
        Method method = null;

        try {
            method = getMethod(name);
        } catch (NoSuchMethodException e) {
            String message =
                messages.getMessage("event.parameter", mapping.getPath());

            LOG.error(message + " " + mapping.getParameter());

            throw new ServletException(message);
        }

        return dispatchMethod(mapping, form, request, response, name, method);
    }

    /**
     * Returns the method name, given a parameter's value.
     *
     * @param mapping   The ActionMapping used to select this instance
     * @param form      The optional ActionForm bean for this request (if
     *                  any)
     * @param request   The HTTP request we are processing
     * @param response  The HTTP response we are creating
     * @param parameter The <code>ActionMapping</code> parameter's name
     * @return The method's name.
     * @throws Exception if an error occurs.
     */
    protected String getMethodName(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response,
            String parameter) throws Exception {

        StringTokenizer st = new StringTokenizer(parameter, ",");
        String defaultMethodName = null;

        while (st.hasMoreTokens()) {
            String methodKey = st.nextToken().trim();
            String methodName = methodKey;

            // The key can either be a direct method name or an alias
            // to a method as indicated by a "key=value" signature
            int equals = methodKey.indexOf('=');
            if (equals > -1) {
                methodName = methodKey.substring(equals + 1).trim();
                methodKey = methodKey.substring(0, equals).trim();
            }

            // Set the default if it passes by
            if (methodKey.equals(DEFAULT_METHOD_KEY)) {
                defaultMethodName = methodName;
            }

            // If the method key exists as a standalone parameter or with
            // the image suffixes (.x/.y), the method name has been found.
            if ((request.getParameter(methodKey) != null)
                  || (request.getParameter(methodKey + ".x") != null)) {
                return methodName;
            }
        }

        return defaultMethodName;
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
玉足女爽爽91| 国产成人免费视频| 国产曰批免费观看久久久| 高清beeg欧美| 日韩视频免费直播| 亚洲在线一区二区三区| 成人动漫一区二区在线| 精品久久一区二区三区| 亚洲国产精品久久不卡毛片| 岛国一区二区三区| 精品国产免费人成在线观看| 亚洲一区二区三区四区五区黄| 国产成人av一区二区三区在线 | 国产精品女主播av| 日本vs亚洲vs韩国一区三区二区 | 亚洲影视在线播放| www.日韩在线| www日韩大片| 精东粉嫩av免费一区二区三区| 在线欧美日韩国产| 亚洲欧美另类小说| 成人av网址在线观看| 久久久午夜精品| 另类人妖一区二区av| 5月丁香婷婷综合| 亚洲成人自拍网| 欧美视频中文字幕| 一区二区成人在线观看| 91福利国产成人精品照片| 亚洲乱码中文字幕| 一本久久精品一区二区| 亚洲精选在线视频| 精品视频免费看| 亚洲国产成人av网| 在线91免费看| 奇米影视一区二区三区| 日韩一区二区三区电影在线观看 | 亚洲精品久久久久久国产精华液| 成人黄色在线网站| 亚洲视频你懂的| 欧洲精品一区二区三区在线观看| 亚洲女子a中天字幕| 欧洲精品一区二区| 日韩电影免费在线观看网站| 日韩欧美一级在线播放| 黑人精品欧美一区二区蜜桃 | 精品久久人人做人人爽| 激情深爱一区二区| 国产欧美日韩另类视频免费观看| 99视频一区二区| 亚洲国产cao| 欧美精品一区二区三区视频| 福利一区福利二区| 亚洲日本欧美天堂| 欧美精品tushy高清| 国产一区二区视频在线| 亚洲欧美自拍偷拍色图| 欧美在线观看视频一区二区三区| 视频一区二区欧美| 精品少妇一区二区三区| 成人免费av资源| 五月综合激情网| 久久综合狠狠综合| 色综合天天性综合| 久久99精品久久久久久动态图| 中文文精品字幕一区二区| 欧美亚洲一区二区在线观看| 精品一区二区综合| 亚洲欧美视频一区| 欧美成人a视频| 91玉足脚交白嫩脚丫在线播放| 亚洲大片在线观看| 中文在线一区二区| 日韩欧美一级精品久久| av成人免费在线| 久久精品免费观看| 亚洲狠狠丁香婷婷综合久久久| 精品国产一区二区三区不卡 | 日韩欧美国产三级电影视频| 成人av先锋影音| 美女高潮久久久| 亚洲精品成人在线| 国产清纯白嫩初高生在线观看91 | 91激情在线视频| 激情文学综合插| 香蕉乱码成人久久天堂爱免费| 精品88久久久久88久久久| 欧美中文字幕一区二区三区亚洲 | 久久综合成人精品亚洲另类欧美| av一区二区三区四区| 精一区二区三区| 无码av中文一区二区三区桃花岛| 中文字幕av一区二区三区| 精品第一国产综合精品aⅴ| 欧美日韩在线不卡| 91视频免费看| jizz一区二区| 国产成人精品免费看| 国产自产视频一区二区三区| 日韩激情一二三区| 亚洲国产精品久久久久婷婷884| 最新日韩av在线| 国产精品视频第一区| 国产视频亚洲色图| 久久女同精品一区二区| 精品国产一区二区三区久久影院 | 国产三区在线成人av| 91精品啪在线观看国产60岁| 欧美日韩一区高清| 在线一区二区观看| 91国偷自产一区二区三区观看| 99国产精品久久久久| 成人免费视频一区二区| 国产精品一区二区在线看| 极品尤物av久久免费看| 激情深爱一区二区| 国产乱色国产精品免费视频| 狠狠色丁香婷综合久久| 久久国产综合精品| 精品亚洲免费视频| 国产一区二区不卡| 成人av午夜电影| 96av麻豆蜜桃一区二区| 色婷婷亚洲婷婷| 欧美视频三区在线播放| 9191久久久久久久久久久| 日韩免费看的电影| www激情久久| 欧美国产一区二区| 亚洲乱码精品一二三四区日韩在线| 亚洲人123区| 亚洲va天堂va国产va久| 性欧美疯狂xxxxbbbb| 久草中文综合在线| 成人黄色a**站在线观看| 成人免费av资源| 欧美三级韩国三级日本三斤| 欧美一区二区三区视频| 久久亚洲欧美国产精品乐播 | av一区二区三区在线| 欧美性视频一区二区三区| 91精品国产手机| 久久亚洲二区三区| 亚洲免费色视频| 日本视频在线一区| 成人一区二区三区视频在线观看 | 丝袜脚交一区二区| 国产精品综合二区| 欧美最新大片在线看| 欧美mv和日韩mv国产网站| 中文字幕一区在线观看视频| 三级亚洲高清视频| 成人高清免费观看| 在线播放国产精品二区一二区四区| 欧美成人一级视频| 亚洲人成网站精品片在线观看| 视频一区二区欧美| 91在线观看一区二区| 精品国精品国产| 亚洲高清免费在线| 成人美女在线观看| 欧美刺激脚交jootjob| 亚洲精品美腿丝袜| 国产一区二区毛片| 欧美吻胸吃奶大尺度电影| 国产欧美日产一区| 日本欧美在线看| 欧洲一区二区av| 中文字幕二三区不卡| 久久国产精品无码网站| 在线免费不卡视频| 中文字幕亚洲一区二区va在线| 麻豆国产欧美日韩综合精品二区| 91高清视频免费看| 国产精品久久精品日日| 国内精品免费**视频| 欧美丰满少妇xxxxx高潮对白| 1区2区3区国产精品| 国产伦精品一区二区三区免费 | 欧美色图在线观看| 国产精品美女久久久久久久 | 欧美在线观看一二区| 国产精品久久网站| 国产精品夜夜爽| 久久综合久久久久88| 日韩精品亚洲一区二区三区免费| 日本精品一级二级| 亚洲欧洲三级电影| 成人免费黄色在线| 国产欧美日韩综合精品一区二区| 蜜桃精品视频在线观看| 欧美一区二区视频在线观看2020| 一区av在线播放| 91福利在线看| 夜夜嗨av一区二区三区| 色av综合在线| 亚洲一二三四区| 色综合久久久网| 亚洲自拍偷拍图区| 精品视频在线看|