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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? componentcontext.java

?? struts的源代碼
?? JAVA
字號(hào):
/*
 * $Id: ComponentContext.java 55576 2004-10-26 06:31:13Z husted $ 
 *
 * Copyright 1999-2004 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.tiles;

import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import javax.servlet.ServletRequest;
import javax.servlet.jsp.PageContext;

import org.apache.struts.taglib.tiles.ComponentConstants;

/**
 * Component context.
 */
public class ComponentContext implements Serializable {

    /**
     * Component attributes.
     */
    private Map attributes=null;

    /**
     * Constructor.
     */
    public ComponentContext() {
        super();
    }

    /**
     * Constructor.
     * Create a context and set specified attributes.
     * @param attributes Attributes to initialize context.
     */
    public ComponentContext(Map attributes) {
        if (attributes != null) {
            this.attributes = new HashMap(attributes);
        }
    }

    /**
     * Add all attributes to this context.
     * Copies all of the mappings from the specified attribute map to this context.
     * New attribute mappings will replace any mappings that this context had for any of the keys
     * currently in the specified attribute map.
     * @param newAttributes Attributes to add.
     */
    public void addAll(Map newAttributes) {
        if (attributes == null) {
            attributes = new HashMap(newAttributes);
            return;
        }
        
        attributes.putAll(newAttributes);
    }

    /**
     * Add all missing attributes to this context.
     * Copies all of the mappings from the specified attributes map to this context.
     * New attribute mappings will be added only if they don't already exist in
     * this context.
     * @param defaultAttributes Attributes to add.
     */
    public void addMissing(Map defaultAttributes) {
        if (defaultAttributes == null) {
            return;
        }
        
        if (attributes == null) {
            attributes = new HashMap(defaultAttributes);
            return;
        }

        Set entries = defaultAttributes.entrySet();
        Iterator iterator = entries.iterator();
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            if (!attributes.containsKey(entry.getKey())) {
                attributes.put(entry.getKey(), entry.getValue());
            }
        }
    }

    /**
     * Get an attribute from context.
     * @param name Name of the attribute.
     * @return <{Object}>
     */
    public Object getAttribute(String name) {
        if (attributes == null){
            return null;
        }
        
        return attributes.get(name);
    }

    /**
     * Get names of all attributes.
     * @return <{Object}>
     */
    public Iterator getAttributeNames() {
        if (attributes == null) {
            return Collections.EMPTY_LIST.iterator();
        }
        
        return attributes.keySet().iterator();
    }

    /**
     * Put a new attribute to context.
     * @param name Name of the attribute.
     * @param value Value of the attribute.
     */
    public void putAttribute(String name, Object value) {
        if (attributes == null) {
            attributes = new HashMap();
        }

        attributes.put(name, value);
    }

    /**
     * Find object in one of the contexts.
     * Order : component then pageContext.findAttribute()
     * @param beanName Name of the bean to find.
     * @param pageContext Page context.
     * @return Requested bean or <code>null</code> if not found.
     */
    public Object findAttribute(String beanName, PageContext pageContext) {
        Object attribute = getAttribute(beanName);
        if (attribute == null) {
            attribute = pageContext.findAttribute(beanName);
        }
        
        return attribute;
    }

    /**
     * Get object from requested context.
     * Context can be 'component'.
     * @param beanName Name of the bean to find.
     * @param scope Search scope (see {@link PageContext}).
     * @param pageContext Page context.
     * @return requested bean or <code>null</code> if not found.
     */
    public Object getAttribute(
        String beanName,
        int scope,
        PageContext pageContext) {
            
        if (scope == ComponentConstants.COMPONENT_SCOPE){
            return getAttribute(beanName);
        }
        
        return pageContext.getAttribute(beanName, scope);
    }

    /**
     * Get component context from request.
     * @param request ServletRequest.
     * @return ComponentContext or null if context is not found or an
     * jspException is present in the request.
     */
    static public ComponentContext getContext(ServletRequest request) {
       if (request.getAttribute("javax.servlet.jsp.jspException") != null) {
           return null;
        }        return (ComponentContext) request.getAttribute(
            ComponentConstants.COMPONENT_CONTEXT);
    }

    /**
     * Store component context into request.
     * @param context ComponentContext to store.
     * @param request Request to store ComponentContext.
     */
    static public void setContext(
        ComponentContext context,
        ServletRequest request) {
            
        request.setAttribute(ComponentConstants.COMPONENT_CONTEXT, context);
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片一区二区三区| 欧美视频一区二区在线观看| 精品综合久久久久久8888| 午夜精品久久久久久久久久| 亚洲美女视频在线| 亚洲激情六月丁香| 一区二区三区自拍| 一区二区在线观看视频在线观看| 综合av第一页| 亚洲小说欧美激情另类| 亚洲一区二区3| 亚洲va国产va欧美va观看| 亚洲国产日韩一区二区| 亚洲第一精品在线| 美国欧美日韩国产在线播放| 久久99精品久久久久久| 粉嫩av一区二区三区粉嫩 | 成人网男人的天堂| 成人精品国产一区二区4080| 成人av电影免费在线播放| 99精品视频在线免费观看| 91九色最新地址| 91精品国产一区二区三区| 在线观看91av| 亚洲精品在线观看视频| 日本一区二区三区视频视频| √…a在线天堂一区| 亚洲午夜免费视频| 精品一区二区三区香蕉蜜桃 | 欧美一区二区三区色| 欧美成人一级视频| 国产精品乱子久久久久| 亚洲欧美一区二区久久 | 风间由美一区二区av101| av在线综合网| 欧美高清视频www夜色资源网| 精品剧情v国产在线观看在线| 国产精品高清亚洲| 午夜免费久久看| 国产精品一区二区视频| 91一区在线观看| 欧美一区二区三区公司| 国产亚洲1区2区3区| 一区二区三区中文在线| 久久99国产精品久久99| 91麻豆精品在线观看| 欧美一区二区视频在线观看2020| 国产视频在线观看一区二区三区 | 亚洲国产欧美在线人成| 国产精品一级片在线观看| 欧美在线观看你懂的| 国产欧美一区二区在线观看| 亚洲一区av在线| 国产成人免费在线视频| 欧美日韩高清影院| 欧美国产精品一区| 日本不卡视频一二三区| 99re热这里只有精品视频| 欧美成人猛片aaaaaaa| 一区二区在线免费观看| 国产美女在线观看一区| 欧美日韩亚洲综合在线| 国产精品久久久久婷婷二区次| 天堂久久一区二区三区| 91亚洲精品一区二区乱码| 久久久久久一二三区| 午夜在线成人av| 99精品1区2区| 国产欧美视频一区二区三区| 秋霞成人午夜伦在线观看| 色婷婷综合久色| 日本一区二区成人在线| 久久福利资源站| 欧美日韩国产123区| 一区二区三区精品| eeuss影院一区二区三区| 精品福利一区二区三区| 免费欧美在线视频| 欧美色图天堂网| 亚洲视频免费在线| 成人免费看片app下载| 久久久蜜桃精品| 韩国av一区二区三区在线观看| 欧美丰满美乳xxx高潮www| 亚洲精品水蜜桃| 99re免费视频精品全部| 国产精品无人区| 国产精品一区二区果冻传媒| 日韩你懂的在线观看| 日韩不卡手机在线v区| 欧美日韩国产系列| 亚洲444eee在线观看| 91成人免费网站| 一区二区三区四区国产精品| 91啪亚洲精品| 亚洲丝袜自拍清纯另类| 99re免费视频精品全部| 亚洲视频一二三| 色先锋资源久久综合| 国产婷婷色一区二区三区在线| 国产又粗又猛又爽又黄91精品| 日韩欧美123| 精品在线免费观看| 精品国产乱码久久久久久久久 | 久久9热精品视频| 日韩欧美成人一区二区| 美女视频第一区二区三区免费观看网站| 欧美亚洲国产一区二区三区va| 亚洲男人天堂一区| 91九色02白丝porn| 亚洲国产aⅴ天堂久久| 欧美伦理影视网| 老司机精品视频在线| 精品999在线播放| 国产精品资源站在线| 国产精品丝袜黑色高跟| www.欧美.com| 亚洲自拍欧美精品| 91精品国产一区二区三区香蕉| 免费在线观看成人| 久久亚洲精华国产精华液| 国产精品1区二区.| 中文字幕一区二区三区乱码在线| 一本大道av一区二区在线播放| 亚洲国产精品一区二区尤物区| 欧美一区二区高清| 国产精品自在欧美一区| 亚洲欧美中日韩| 欧美精品在线观看播放| 久久99在线观看| 国产精品传媒入口麻豆| 欧美色精品在线视频| 日本aⅴ精品一区二区三区| 久久久精品免费网站| 99精品国产热久久91蜜凸| 午夜欧美在线一二页| 久久久欧美精品sm网站| 91亚洲国产成人精品一区二区三 | 精品一区二区免费看| 欧美激情一区二区三区全黄| 色狠狠色狠狠综合| 九一九一国产精品| 日韩美女视频一区| 日韩一区二区在线看片| 风间由美一区二区三区在线观看 | 欧美日韩在线电影| 国产一区三区三区| 亚洲女女做受ⅹxx高潮| 日韩一卡二卡三卡四卡| 成人黄色电影在线| 日韩国产在线一| 国产精品区一区二区三区| 欧美日韩高清在线播放| 国产91在线看| 亚洲成人av免费| 国产精品午夜久久| 欧美一级片免费看| 91在线国产福利| 国产美女精品人人做人人爽 | 国产精品18久久久久久久久| 亚洲另类一区二区| 精品久久久久久久久久久久包黑料| 91丝袜美女网| 国产成人啪午夜精品网站男同| 亚洲.国产.中文慕字在线| 国产精品国产三级国产三级人妇 | 麻豆精品视频在线观看视频| 亚洲视频免费在线观看| 久久综合九色综合97_久久久| 欧美在线小视频| av在线免费不卡| 国产一区二区伦理| 香蕉乱码成人久久天堂爱免费| 亚洲国产精品v| 精品国产一区二区三区四区四| 欧美综合一区二区| 豆国产96在线|亚洲| 奇米精品一区二区三区在线观看一| 亚洲女同ⅹxx女同tv| 中文字幕av资源一区| 欧美大尺度电影在线| 欧美日韩一卡二卡| 色综合天天综合网天天看片| 国产毛片精品国产一区二区三区| 日本成人在线电影网| 亚洲国产你懂的| 亚洲一区二区三区中文字幕 | 麻豆精品国产传媒mv男同| 亚洲午夜精品一区二区三区他趣| 国产精品传媒入口麻豆| 国产欧美1区2区3区| 久久综合久久99| 精品国产乱子伦一区| 欧美xxxxx牲另类人与| 91麻豆精品国产91久久久久| 欧美自拍丝袜亚洲| 在线看日韩精品电影| 在线免费观看视频一区| 91成人看片片| 欧美在线一区二区|