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

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

?? action.java

?? Apache struts-1.3.10 a stable version
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Id: Action.java 471754 2006-11-06 14:55:09Z husted $
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.action;

import org.apache.struts.Globals;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.util.MessageResources;
import org.apache.struts.util.ModuleUtils;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.TokenProcessor;

import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import java.util.Locale;

/**
 * <p>An <strong>Action</strong> is an adapter between the contents of an
 * incoming HTTP request and the corresponding business logic that should be
 * executed to process this request. The controller (RequestProcessor) will
 * select an appropriate Action for each request, create an instance (if
 * necessary), and call the <code>execute</code> method.</p>
 *
 * <p>Actions must be programmed in a thread-safe manner, because the
 * controller will share the same instance for multiple simultaneous requests.
 * This means you should design with the following items in mind: </p>
 *
 * <ul>
 *
 * <li>Instance and static variables MUST NOT be used to store information
 * related to the state of a particular request. They MAY be used to share
 * global resources across requests for the same action.</li>
 *
 * <li>Access to other resources (JavaBeans, session variables, etc.) MUST be
 * synchronized if those resources require protection. (Generally, however,
 * resource classes should be designed to provide their own protection where
 * necessary.</li>
 *
 * </ul>
 *
 * <p>When an <code>Action</code> instance is first created, the controller
 * will call <code>setServlet</code> with a non-null argument to identify the
 * servlet instance to which this Action is attached. When the servlet is to
 * be shut down (or restarted), the <code>setServlet</code> method will be
 * called with a <code>null</code> argument, which can be used to clean up any
 * allocated resources in use by this Action.</p>
 *
 * @version $Rev: 471754 $ $Date: 2005-08-26 21:58:39 -0400 (Fri, 26 Aug 2005)
 *          $
 */
public class Action {
    /**
     * <p>An instance of <code>TokenProcessor</code> to use for token
     * functionality.</p>
     */
    private static TokenProcessor token = TokenProcessor.getInstance();

    // NOTE: We can make the tken  variable protected and remove Action's
    // token methods or leave it private and allow the token methods to
    // delegate their calls.
    // ----------------------------------------------------- Instance Variables

    /**
     * <p>The servlet to which we are attached.</p>
     */
    protected transient ActionServlet servlet = null;

    // ------------------------------------------------------------- Properties

    /**
     * <p>Return the servlet instance to which we are attached.</p>
     *
     * @return The servlet instance to which we are attached.
     */
    public ActionServlet getServlet() {
        return (this.servlet);
    }

    /**
     * <p>Set the servlet instance to which we are attached (if
     * <code>servlet</code> is non-null), or release any allocated resources
     * (if <code>servlet</code> is null).</p>
     *
     * @param servlet The new controller servlet, if any
     */
    public void setServlet(ActionServlet servlet) {
        this.servlet = servlet;

        // :FIXME: Is this suppose to release resources?
    }

    // --------------------------------------------------------- Public Methods

    /**
     * <p>Process the specified non-HTTP request, and create the corresponding
     * non-HTTP response (or forward to another web component that will create
     * it), with provision for handling exceptions thrown by the business
     * logic. Return an {@link ActionForward} instance describing where and
     * how control should be forwarded, or <code>null</code> if the response
     * has already been completed.</p>
     *
     * <p>The default implementation attempts to forward to the HTTP version
     * of this method.</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.
     * @since Struts 1.1
     */
    public ActionForward execute(ActionMapping mapping, ActionForm form,
        ServletRequest request, ServletResponse response)
        throws Exception {
        try {
            return execute(mapping, form, (HttpServletRequest) request,
                (HttpServletResponse) response);
        } catch (ClassCastException e) {
            return null;
        }
    }

    /**
     * <p>Process the specified HTTP request, and create the corresponding
     * HTTP response (or forward to another web component that will create
     * it), with provision for handling exceptions thrown by the business
     * logic. Return an {@link ActionForward} instance describing where and
     * how control should be forwarded, or <code>null</code> if the response
     * has already been completed.</p>
     *
     * @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
     * @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
     * @since Struts 1.1
     */
    public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {
        return null;
    }

    // ---------------------------------------------------- Protected Methods

    /**
     * Adds the specified messages keys into the appropriate request attribute
     * for use by the &lt;html:messages&gt; tag (if messages="true" is set),
     * if any messages are required. Initialize the attribute if it has not
     * already been. Otherwise, ensure that the request attribute is not set.
     *
     * @param request  The servlet request we are processing
     * @param messages Messages object
     * @since Struts 1.2.1
     */
    protected void addMessages(HttpServletRequest request,
        ActionMessages messages) {
        if (messages == null) {
            //  bad programmer! *slap*
            return;
        }

        // get any existing messages from the request, or make a new one
        ActionMessages requestMessages =
            (ActionMessages) request.getAttribute(Globals.MESSAGE_KEY);

        if (requestMessages == null) {
            requestMessages = new ActionMessages();
        }

        // add incoming messages
        requestMessages.add(messages);

        // if still empty, just wipe it out from the request
        if (requestMessages.isEmpty()) {
            request.removeAttribute(Globals.MESSAGE_KEY);

            return;
        }

        // Save the messages
        request.setAttribute(Globals.MESSAGE_KEY, requestMessages);
    }

    /**
     * Adds the specified errors keys into the appropriate request attribute
     * for use by the &lt;html:errors&gt; tag, if any messages are required.
     * Initialize the attribute if it has not already been. Otherwise, ensure
     * that the request attribute is not set.
     *
     * @param request The servlet request we are processing
     * @param errors  Errors object
     * @since Struts 1.2.1
     */
    protected void addErrors(HttpServletRequest request, ActionMessages errors) {
        if (errors == null) {
            //  bad programmer! *slap*
            return;
        }

        // get any existing errors from the request, or make a new one
        ActionMessages requestErrors =
            (ActionMessages) request.getAttribute(Globals.ERROR_KEY);

        if (requestErrors == null) {
            requestErrors = new ActionMessages();
        }

        // add incoming errors
        requestErrors.add(errors);

        // if still empty, just wipe it out from the request
        if (requestErrors.isEmpty()) {
            request.removeAttribute(Globals.ERROR_KEY);

            return;
        }

        // Save the errors
        request.setAttribute(Globals.ERROR_KEY, requestErrors);
    }

    /**
     * <p>Generate a new transaction token, to be used for enforcing a single
     * request for a particular transaction.</p>
     *
     * @param request The request we are processing
     * @return The new transaction token.
     */
    protected String generateToken(HttpServletRequest request) {
        return token.generateToken(request);
    }

    /**
     * Retrieves any existing errors placed in the request by previous
     * actions. This method could be called instead of creating a <code>new
     * ActionMessages()</code> at the beginning of an <code>Action</code>.
     * This will prevent saveErrors() from wiping out any existing Errors
     *
     * @param request The servlet request we are processing
     * @return the Errors that already exist in the request, or a new
     *         ActionMessages object if empty.
     * @since Struts 1.2.1
     */
    protected ActionMessages getErrors(HttpServletRequest request) {
        ActionMessages errors =
            (ActionMessages) request.getAttribute(Globals.ERROR_KEY);

        if (errors == null) {
            errors = new ActionMessages();
        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产免费久久综合| 国产在线精品一区二区| 亚洲女性喷水在线观看一区| 国产区在线观看成人精品| 国产亚洲成年网址在线观看| 国产亚洲一区二区三区四区| 国产精品久久久久久久久果冻传媒| 中文字幕中文字幕一区二区| 亚洲国产另类av| 国产伦理精品不卡| 色94色欧美sute亚洲线路一久| 欧美日韩和欧美的一区二区| 2021中文字幕一区亚洲| 中文字幕日韩一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产伦理精品不卡| 欧美日韩视频在线观看一区二区三区 | 亚洲大尺度视频在线观看| 免费高清视频精品| 色噜噜狠狠成人网p站| 欧美r级电影在线观看| 亚洲精品五月天| 国产伦精品一区二区三区视频青涩 | 91精品国模一区二区三区| 国产亚洲欧美日韩俺去了| 亚洲欧美一区二区三区极速播放| 蜜桃av一区二区| 欧美日韩午夜在线| 亚洲不卡一区二区三区| 色综合久久88色综合天天6| 久久综合色之久久综合| 蜜臀久久久99精品久久久久久| 91啪在线观看| 玉足女爽爽91| 欧美亚洲国产bt| 午夜亚洲国产au精品一区二区| 风流少妇一区二区| 久久久久久黄色| 成人小视频免费观看| 欧美国产日韩一二三区| 国产·精品毛片| 亚洲色图另类专区| 日本电影欧美片| 丝袜美腿亚洲一区二区图片| 欧美精品vⅰdeose4hd| 日韩制服丝袜av| 欧美日韩高清在线播放| 久久aⅴ国产欧美74aaa| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国模娜娜一区二区三区| 2023国产一二三区日本精品2022| 国产精品系列在线观看| 日韩久久一区二区| 91精品国产欧美一区二区成人 | 欧美大黄免费观看| 成人黄色综合网站| 日本少妇一区二区| 亚洲欧洲美洲综合色网| 日韩视频免费直播| av成人免费在线观看| 蜜桃视频在线观看一区二区| 中文字幕av资源一区| 91精品国产品国语在线不卡| 成人av免费在线观看| 琪琪久久久久日韩精品| 一区在线观看视频| 国产色综合一区| 欧美群妇大交群中文字幕| 成人av一区二区三区| 国内精品国产成人| 久久精品国产亚洲高清剧情介绍| 综合久久国产九一剧情麻豆| 久久久美女毛片| 欧美一级久久久| 88在线观看91蜜桃国自产| 色综合咪咪久久| 99久久er热在这里只有精品15| 久草这里只有精品视频| 免费观看日韩电影| 日韩av午夜在线观看| 日韩在线播放一区二区| 午夜一区二区三区视频| 午夜伊人狠狠久久| 麻豆freexxxx性91精品| 看电视剧不卡顿的网站| 久久99国产乱子伦精品免费| 麻豆国产精品官网| 成人免费观看视频| 色综合天天综合网国产成人综合天 | 久久九九久久九九| 国产日韩欧美高清在线| 中文字幕在线不卡一区二区三区| 国产精品三级av在线播放| 国产精品久久久久久久久免费丝袜 | 99久免费精品视频在线观看| 极品少妇xxxx精品少妇偷拍| 国产一区二区三区免费观看| 国产精品一区二区在线观看不卡| 成人午夜免费视频| 欧美日韩高清在线| 国产精品视频免费| 亚洲一级二级三级在线免费观看| 日日摸夜夜添夜夜添精品视频| 国产在线看一区| 欧美中文字幕一区二区三区| 精品免费日韩av| 最新不卡av在线| 麻豆中文一区二区| 91亚洲资源网| 亚洲精品一区二区三区99| 一级女性全黄久久生活片免费| 日韩精品免费专区| 91国产免费看| 成人欧美一区二区三区小说| 蜜臀精品一区二区三区在线观看 | 国产一区二区三区精品欧美日韩一区二区三区 | 久久疯狂做爰流白浆xx| 91精品办公室少妇高潮对白| 久久久精品2019中文字幕之3| 亚洲成人在线网站| 欧美伊人久久大香线蕉综合69| 国产香蕉久久精品综合网| 老汉av免费一区二区三区| 欧美日韩精品福利| 舔着乳尖日韩一区| 欧美日韩中字一区| 一区二区三区四区精品在线视频| 成人午夜av影视| 中文字幕欧美一| 一本一道久久a久久精品综合蜜臀| 亚洲国产成人一区二区三区| 国产福利91精品一区| 久久亚洲综合色| 成人激情午夜影院| 自拍av一区二区三区| 成人精品免费看| 自拍偷在线精品自拍偷无码专区| 成人午夜av电影| 一级女性全黄久久生活片免费| 在线观看欧美精品| 奇米在线7777在线精品| 中文字幕乱码亚洲精品一区| 97精品超碰一区二区三区| 怡红院av一区二区三区| 欧美一级黄色录像| 精品一区二区av| 亚洲精品成a人| 精品裸体舞一区二区三区| 成人精品小蝌蚪| 亚洲精品日韩一| 精品动漫一区二区三区在线观看| 国产精品一区二区久激情瑜伽| 亚洲男人的天堂在线观看| 欧美一区二区女人| 日本成人超碰在线观看| 国产精品女主播在线观看| 精品视频一区三区九区| 精品午夜一区二区三区在线观看| 国产偷v国产偷v亚洲高清| 99久久国产综合精品麻豆| 麻豆精品在线播放| 偷窥少妇高潮呻吟av久久免费| 亚洲国产精品高清| 久久亚区不卡日本| 日韩免费视频一区二区| 色激情天天射综合网| av激情亚洲男人天堂| 成人在线视频一区| 成人国产精品免费网站| 国内外精品视频| 国产乱人伦偷精品视频不卡 | 欧美色大人视频| 欧美三级中文字幕| 欧美视频自拍偷拍| 91麻豆精品国产91久久久久久| 在线精品视频小说1| 欧美三级日韩三级| 91精品国产综合久久久久| 欧美日韩一区视频| 26uuu久久天堂性欧美| 26uuu国产在线精品一区二区| 久久综合色鬼综合色| 国产欧美日本一区视频| 亚洲欧洲美洲综合色网| 亚洲色图欧美偷拍| 日韩va亚洲va欧美va久久| 免费看黄色91| 国产福利91精品一区| 色呦呦日韩精品| 3d动漫精品啪啪1区2区免费| 欧美精品一区二区久久婷婷| 亚洲国产岛国毛片在线| 日韩综合小视频| 国产风韵犹存在线视精品| 91福利在线播放| 欧美xxx久久| 亚洲午夜久久久久| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲国产精品人人做人人爽| 久久99久久精品欧美|