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

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

?? includetag.java

?? struts的源代碼
?? JAVA
字號(hào):
/*
 * $Id: IncludeTag.java 54929 2004-10-16 16:38:42Z germuska $ 
 *
 * 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.taglib.bean;

import java.io.BufferedInputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts.util.MessageResources;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.taglib.TagUtils;

/**
 * Define the contents of a specified intra-application request as a
 * page scope attribute of type <code>java.lang.String</code>.  If the
 * current request is part of a session, the session identifier will be
 * included in the generated request, so it will be part of the same
 * session.
 * <p>
 * <strong>FIXME</strong>:  In a servlet 2.3 environment, we can use a
 * wrapped response passed to RequestDispatcher.include().
 *
 * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
 */

public class IncludeTag extends TagSupport {

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

    /**
     * Buffer size to use when reading the input stream.
     */
    protected static final int BUFFER_SIZE = 256;

    /**
     * The anchor to be added to the end of the generated hyperlink.
     */
    protected String anchor = null;

    public String getAnchor() {
        return (this.anchor);
    }

    public void setAnchor(String anchor) {
        this.anchor = anchor;
    }

    /**
     * The name of the global <code>ActionForward</code> that contains a
     * path to our requested resource.
     */
    protected String forward = null;

    public String getForward() {
        return (this.forward);
    }

    public void setForward(String forward) {
        this.forward = forward;
    }

    /**
     * The absolute URL to the resource to be included.
     */
    protected String href = null;

    public String getHref() {
        return (this.href);
    }

    public void setHref(String href) {
        this.href = href;
    }

    /**
     * The name of the scripting variable that will be exposed as a page
     * scope attribute.
     */
    protected String id = null;

    public String getId() {
        return (this.id);
    }

    public void setId(String id) {
        this.id = id;
    }

    /**
     * The message resources for this package.
     */
    protected static MessageResources messages =
        MessageResources.getMessageResources("org.apache.struts.taglib.bean.LocalStrings");

    /**
     * Deprecated method to set the "name" attribute, which has been
     * replaced by the "page" attribute.
     *
     * @deprecated use setPage(String) instead
     */
    public void setName(String name) {
        this.page = name;
    }

    /**
     * The context-relative URI of the page or servlet to be included.
     */
    protected String page = null;

    public String getPage() {
        return (this.page);
    }

    public void setPage(String page) {
        this.page = page;
    }

    /**
     * Include transaction token (if any) in the hyperlink?
     */
    protected boolean transaction = false;

    public boolean getTransaction() {
        return (this.transaction);
    }

    public void setTransaction(boolean transaction) {
        this.transaction = transaction;
    }
    
    protected boolean useLocalEncoding = false;
    
	public boolean isUseLocalEncoding() {
		return useLocalEncoding;
	}

	public void setUseLocalEncoding(boolean b) {
		useLocalEncoding = b;
	}

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

    /**
     * Define the contents returned for the specified resource as a
     * page scope attribute.
     *
     * @exception JspException if a JSP error occurs
     */
    public int doStartTag() throws JspException {

        // Set up a URLConnection to read the requested resource
        Map params =
            TagUtils.getInstance().computeParameters(
                pageContext,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                transaction);
        // FIXME - <html:link> attributes
        String urlString = null;
        URL url = null;
        try {
            urlString =
                TagUtils.getInstance().computeURLWithCharEncoding(pageContext, forward, href, page, null,null, params, anchor, false, useLocalEncoding);
            if (urlString.indexOf(':') < 0) {
                HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
                url = new URL(RequestUtils.requestURL(request), urlString);
            } else {
                url = new URL(urlString);
            }
        } catch (MalformedURLException e) {
            TagUtils.getInstance().saveException(pageContext, e);
            throw new JspException(messages.getMessage("include.url", e.toString()));
        }

        URLConnection conn = null;
        try {
            // Set up the basic connection
            conn = url.openConnection();
            conn.setAllowUserInteraction(false);
            conn.setDoInput(true);
            conn.setDoOutput(false);
            // Add a session id cookie if appropriate
            HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
            addCookie(conn, urlString, request);
            // Connect to the requested resource
            conn.connect();
        } catch (Exception e) {
            TagUtils.getInstance().saveException(pageContext, e);
            throw new JspException(
                messages.getMessage("include.open", url.toString(), e.toString()));
        }

        // Copy the contents of this URL
        StringBuffer sb = new StringBuffer();
        try {
            BufferedInputStream is = new BufferedInputStream(conn.getInputStream());
            InputStreamReader in = new InputStreamReader(is); // FIXME - encoding
            char buffer[] = new char[BUFFER_SIZE];
            int n = 0;
            while (true) {
                n = in.read(buffer);
                if (n < 1)
                    break;
                sb.append(buffer, 0, n);
            }
            in.close();
        } catch (Exception e) {
            TagUtils.getInstance().saveException(pageContext, e);
            throw new JspException(
                messages.getMessage("include.read", url.toString(), e.toString()));
        }

        // Define the retrieved content as a page scope attribute
        pageContext.setAttribute(id, sb.toString());

        // Skip any body of this tag
        return (SKIP_BODY);
    }
    /**
     *  Add a session id cookie if appropriate. Can be overloaded to
     *  support a cluster.
     * @param conn
     * @param urlString
     * @param request
     * @since Struts 1.2.0
     */
    protected void addCookie(URLConnection conn, String urlString, HttpServletRequest request) {
        if ((conn instanceof HttpURLConnection)
            && urlString.startsWith(request.getContextPath())
            && (request.getRequestedSessionId() != null)
            && request.isRequestedSessionIdFromCookie()) {
            StringBuffer sb = new StringBuffer("JSESSIONID=");
            sb.append(request.getRequestedSessionId());
            conn.setRequestProperty("Cookie", sb.toString());
        }
    }

    /**
     * Release all allocated resources.
     */
    public void release() {
        super.release();
        anchor = null;
        forward = null;
        href = null;
        id = null;
        page = null;
        transaction = false;
    }    

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久这里只有精品首页| 日本国产一区二区| 欧美亚洲日本一区| 国产精品萝li| 91视频在线看| 亚洲一区二区成人在线观看| 色视频欧美一区二区三区| 亚洲成人免费观看| 欧美精品1区2区3区| 蜜臀精品一区二区三区在线观看| 精品国产亚洲在线| 国产91对白在线观看九色| 1024成人网| 欧美在线三级电影| 日韩成人av影视| 2021中文字幕一区亚洲| 国产成人鲁色资源国产91色综 | 国产精品久久三区| 色综合网站在线| 香蕉乱码成人久久天堂爱免费| 欧美一区二区三区在线视频| 国产一区亚洲一区| 亚洲欧美自拍偷拍色图| 欧美性受xxxx黑人xyx性爽| 捆绑调教一区二区三区| 国产精品国产三级国产aⅴ中文 | 国产精品影视在线观看| 亚洲免费资源在线播放| 欧美电影在线免费观看| 国产999精品久久久久久绿帽| 亚洲综合色丁香婷婷六月图片| 日韩欧美成人激情| 97久久超碰国产精品电影| 亚洲成人一区二区在线观看| 国产清纯在线一区二区www| 欧美自拍偷拍午夜视频| 国产成人免费视频网站| 日韩中文字幕一区二区三区| 国产亚洲自拍一区| 欧美视频一区二区三区四区| 国产不卡在线一区| 蜜桃视频一区二区| 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲精品在线网站| 欧美偷拍一区二区| 9人人澡人人爽人人精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲丝袜美腿综合| 久久久久亚洲蜜桃| 欧美午夜精品久久久| 国产成人a级片| 青青草91视频| 亚洲成人第一页| 亚洲色欲色欲www在线观看| 久久久精品国产免大香伊 | 麻豆专区一区二区三区四区五区| 亚洲四区在线观看| 成人视屏免费看| 免费成人在线网站| 亚洲福利视频三区| 亚洲尤物视频在线| 中文字幕五月欧美| 国产精品美女一区二区三区| 久久―日本道色综合久久| 国产一区二区三区四区在线观看| 天天做天天摸天天爽国产一区| 一区二区中文视频| 国产精品视频麻豆| 国产欧美日韩卡一| 久久久国产午夜精品| 日韩欧美亚洲一区二区| 777xxx欧美| 欧美一区二区三区成人| 欧美精品乱码久久久久久按摩 | 久草热8精品视频在线观看| 日韩高清不卡一区二区三区| 亚洲曰韩产成在线| 夜夜精品视频一区二区| 亚洲午夜在线观看视频在线| 亚洲午夜私人影院| 爽好久久久欧美精品| 日本亚洲三级在线| 石原莉奈一区二区三区在线观看 | 欧美一区二区高清| 日韩亚洲欧美中文三级| 日韩精品一区二区三区四区视频 | 亚洲精品成a人| 亚洲福利一区二区三区| 日韩成人精品在线| 激情图片小说一区| 国产白丝网站精品污在线入口 | 在线亚洲免费视频| 欧美性极品少妇| 欧美一三区三区四区免费在线看| 日韩一卡二卡三卡国产欧美| 精品欧美一区二区三区精品久久| 高清在线观看日韩| 91视频com| 欧美日韩亚洲综合一区二区三区| 欧美日韩高清不卡| 久久久久久影视| 亚洲男女毛片无遮挡| 日本不卡123| 国产一区二区美女诱惑| www.亚洲在线| 欧美色男人天堂| 精品成a人在线观看| 亚洲国产精品黑人久久久| 亚洲精品乱码久久久久久黑人 | 日韩一二三区视频| 欧美国产激情二区三区 | 制服丝袜在线91| 久久九九国产精品| 亚洲在线视频网站| 精品一区二区免费在线观看| 国产成人精品亚洲午夜麻豆| 欧美图片一区二区三区| 欧美精品一区二区三区一线天视频| 国产精品三级久久久久三级| 亚洲国产一区二区三区青草影视| 亚洲国产精品ⅴa在线观看| 亚洲狠狠爱一区二区三区| 激情综合网最新| 91电影在线观看| 久久久久亚洲综合| 视频精品一区二区| 成人高清免费观看| 欧美揉bbbbb揉bbbbb| 中文av一区二区| 天天操天天综合网| 91在线你懂得| 欧美精品一区二区三区蜜桃视频 | 久久久欧美精品sm网站| 午夜电影一区二区三区| 《视频一区视频二区| 久久不见久久见免费视频1 | 91麻豆精品国产91久久久更新时间 | 日本欧美一区二区三区乱码| www.亚洲国产| 久久综合五月天婷婷伊人| 亚洲国产精品一区二区久久恐怖片 | 欧美日韩mp4| 亚洲美女视频一区| 国产精品66部| 欧美一区二区三区视频在线观看| 亚洲欧美另类图片小说| 国产大陆a不卡| 精品盗摄一区二区三区| 日韩成人伦理电影在线观看| 欧美日韩亚洲综合一区| 亚洲三级在线播放| 成人免费看的视频| 久久夜色精品国产欧美乱极品| 全国精品久久少妇| 欧美视频精品在线| 亚洲一区精品在线| 日韩中文字幕1| 欧美日韩国产精品自在自线| 亚洲美女视频在线| 日本黄色一区二区| 一区二区不卡在线视频 午夜欧美不卡在| 成人av网站在线观看免费| 久久久久久久网| 国产经典欧美精品| 欧美激情一区在线观看| 成人性生交大片免费看中文| 国产精品欧美极品| 91在线小视频| 一区二区三区四区不卡在线| 色菇凉天天综合网| 亚洲综合男人的天堂| 欧美亚洲一区二区在线| 亚洲电影激情视频网站| 在线免费观看日本一区| 亚洲一区二区精品久久av| 欧美久久久一区| 久久久亚洲国产美女国产盗摄 | 日本女优在线视频一区二区| 欧美精品在线一区二区三区| 亚洲福利视频三区| 91麻豆精品国产91久久久使用方法| 三级久久三级久久久| 91精品欧美一区二区三区综合在| 精品无码三级在线观看视频 | 国产盗摄精品一区二区三区在线| 国产色产综合产在线视频| 成人深夜视频在线观看| 一区二区三区四区在线免费观看| 色999日韩国产欧美一区二区| 亚洲第一搞黄网站| 日韩美一区二区三区| 国产成人h网站| 亚洲精品菠萝久久久久久久| 欧美日韩精品福利| 精品在线视频一区| 国产精品国产三级国产aⅴ中文 | 日本不卡123| 国产精品污污网站在线观看| 色综合咪咪久久| 丝袜a∨在线一区二区三区不卡|