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

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

?? writetag.java

?? struts的源代碼
?? JAVA
字號(hào):
/*
 * $Id: WriteTag.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.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.text.Format;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;

/**
 * Tag that retrieves the specified property of the specified bean, converts
 * it to a String representation (if necessary), and writes it to the current
 * output stream, optionally filtering characters that are sensitive in HTML.
 *
 * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
 */
public class WriteTag extends TagSupport {

    /**
     * The key to search default format string for java.sql.Timestamp in resources.
     */
    public static final String SQL_TIMESTAMP_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.sql.timestamp";

    /**
     * The key to search default format string for java.sql.Date in resources.
     */
    public static final String SQL_DATE_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.sql.date";

    /**
     * The key to search default format string for java.sql.Time in resources.
     */
    public static final String SQL_TIME_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.sql.time";

    /**
     * The key to search default format string for java.util.Date in resources.
     */
    public static final String DATE_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.date";

    /**
     * The key to search default format string for int (byte, short, etc.) in resources.
     */
    public static final String INT_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.int";

    /**
     * The key to search default format string for float (double, BigDecimal) in
     * resources.
     */
    public static final String FLOAT_FORMAT_KEY =
        "org.apache.struts.taglib.bean.format.float";

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

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

    /**
     * Filter the rendered output for characters that are sensitive in HTML?
     */
    protected boolean filter = true;

    public boolean getFilter() {
        return (this.filter);
    }

    public void setFilter(boolean filter) {
        this.filter = filter;
    }

    /**
     * Should we ignore missing beans and simply output nothing?
     */
    protected boolean ignore = false;

    public boolean getIgnore() {
        return (this.ignore);
    }

    public void setIgnore(boolean ignore) {
        this.ignore = ignore;
    }

    /**
     * Name of the bean that contains the data we will be rendering.
     */
    protected String name = null;

    public String getName() {
        return (this.name);
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * Name of the property to be accessed on the specified bean.
     */
    protected String property = null;

    public String getProperty() {
        return (this.property);
    }

    public void setProperty(String property) {
        this.property = property;
    }

    /**
     * The scope to be searched to retrieve the specified bean.
     */
    protected String scope = null;

    public String getScope() {
        return (this.scope);
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    /**
     * The format string to be used as format to convert
     * value to String.
     */
    protected String formatStr = null;

    public String getFormat() {
        return (this.formatStr);
    }

    public void setFormat(String formatStr) {
        this.formatStr = formatStr;
    }

    /**
     * The key to search format string in applciation resources
     */
    protected String formatKey = null;

    public String getFormatKey() {
        return (this.formatKey);
    }

    public void setFormatKey(String formatKey) {
        this.formatKey = formatKey;
    }

    /**
     * The session scope key under which our Locale is stored.
     */
    protected String localeKey = null;

    public String getLocale() {
        return (this.localeKey);
    }

    public void setLocale(String localeKey) {
        this.localeKey = localeKey;
    }

    /**
     * The servlet context attribute key for our resources.
     */
    protected String bundle = null;

    public String getBundle() {
        return (this.bundle);
    }

    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

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

    /**
     * Process the start tag.
     *
     * @exception JspException if a JSP exception has occurred
     */
    public int doStartTag() throws JspException {

        // Look up the requested bean (if necessary)
        if (ignore) {
            if (TagUtils.getInstance().lookup(pageContext, name, scope) == null) {
                return (SKIP_BODY); // Nothing to output
            }
        }

        // Look up the requested property value
        Object value = TagUtils.getInstance().lookup(pageContext, name, property, scope);

        if (value == null) {
            return (SKIP_BODY); // Nothing to output
        }

        // Convert value to the String with some formatting
        String output = formatValue(value);

        // Print this property value to our output writer, suitably filtered
        if (filter) {
            TagUtils.getInstance().write(pageContext, TagUtils.getInstance().filter(output));
        } else {
            TagUtils.getInstance().write(pageContext, output);
        }

        // Continue processing this page
        return (SKIP_BODY);

    }

    /**
     * Retrieve format string from message bundle and return null if
     * message not found or message string.
     *
     * @param formatKey value to use as key to search message in bundle
     * @exception JspException if a JSP exception has occurred
     */
    protected String retrieveFormatString(String formatKey) throws JspException {
        String result =
            TagUtils.getInstance().message(
                pageContext,
                this.bundle,
                this.localeKey,
                formatKey);

        if ((result != null)
            && !(result.startsWith("???") && result.endsWith("???"))) {

            return result;

        } else {
            return null;
        }

    }

    /**
     * Format value according to specified format string (as tag attribute or
     * as string from message resources) or to current user locale.
     *
     * When a format string is retrieved from the message resources,
     * <code>applyLocalizedPattern</code> is used. For more about localized
     * patterns, see
     * <http://www.dei.unipd.it/corsi/fi2ae-docs/source/jdk1.1.7/src/java/text/resources/>.
     * (To obtain the correct value for some characters, you may need to view
     * the file in a hex editor and then use the Unicode escape form in the
     * property resources file.)
     *
     * @param valueToFormat value to process and convert to String
     * @exception JspException if a JSP exception has occurred
     */
    protected String formatValue(Object valueToFormat) throws JspException {
        Format format = null;
        Object value = valueToFormat;
        Locale locale = TagUtils.getInstance().getUserLocale(pageContext, this.localeKey);
        boolean formatStrFromResources = false;
        String formatString = formatStr;

        // Return String object as is.
        if (value instanceof java.lang.String) {
            return (String) value;
        } else {

            // Try to retrieve format string from resources by the key from formatKey.
            if ((formatString == null) && (formatKey != null)) {
                formatString = retrieveFormatString(this.formatKey);
                if (formatString != null) {
                    formatStrFromResources = true;
                }
            }

            // Prepare format object for numeric values.
            if (value instanceof Number) {

                if (formatString == null) {
                    if ((value instanceof Byte)
                        || (value instanceof Short)
                        || (value instanceof Integer)
                        || (value instanceof Long)
                        || (value instanceof BigInteger)) {

                        formatString = retrieveFormatString(INT_FORMAT_KEY);

                    } else if (
                        (value instanceof Float)
                            || (value instanceof Double)
                            || (value instanceof BigDecimal)) {

                        formatString = retrieveFormatString(FLOAT_FORMAT_KEY);
                    }

                    if (formatString != null) {
                        formatStrFromResources = true;
                    }
                }

                if (formatString != null) {
                    try {
                        format = NumberFormat.getNumberInstance(locale);
                        if (formatStrFromResources) {
                            ((DecimalFormat) format).applyLocalizedPattern(
                                formatString);
                        } else {
                            ((DecimalFormat) format).applyPattern(formatString);
                        }

                    } catch (IllegalArgumentException e) {
                        JspException ex =
                            new JspException(
                                messages.getMessage("write.format", formatString));
                        TagUtils.getInstance().saveException(pageContext, ex);
                        throw ex;
                    }
                }

            } else if (value instanceof java.util.Date) {

                if (formatString == null) {

                    if (value instanceof java.sql.Timestamp) {
                        formatString =
                            retrieveFormatString(SQL_TIMESTAMP_FORMAT_KEY);

                    } else if (value instanceof java.sql.Date) {
                        formatString = retrieveFormatString(SQL_DATE_FORMAT_KEY);

                    } else if (value instanceof java.sql.Time) {
                        formatString = retrieveFormatString(SQL_TIME_FORMAT_KEY);

                    } else if (value instanceof java.util.Date) {
                        formatString = retrieveFormatString(DATE_FORMAT_KEY);
                    }

                }

                if (formatString != null) {
                        format = new SimpleDateFormat(formatString, locale);
                }
            }
        }

        if (format != null) {
            return format.format(value);
        } else {
            return value.toString();
        }

    }

    /**
     * Release all allocated resources.
     */
    public void release() {

        super.release();
        filter = true;
        ignore = false;
        name = null;
        property = null;
        scope = null;
        formatStr = null;
        formatKey = null;
        localeKey = null;
        bundle = null;

    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级电影网站| 久久久美女艺术照精彩视频福利播放| 亚洲一区在线看| 国产调教视频一区| 成人免费一区二区三区视频| 91精品国产综合久久精品app| www.综合网.com| 成人午夜av在线| 久久精品国产99久久6| 色综合天天狠狠| zzijzzij亚洲日本少妇熟睡| 成人一区在线观看| 国产成a人亚洲精品| 精品无人码麻豆乱码1区2区| 蜜桃精品在线观看| 激情综合一区二区三区| 性欧美大战久久久久久久久| 亚洲国产综合人成综合网站| 亚洲人成小说网站色在线 | 国产aⅴ综合色| 国产成人无遮挡在线视频| 国产精品99久久久久久久女警| 国产乱理伦片在线观看夜一区| 久久久久久久久久久电影| 亚洲精品一区二区精华| 亚洲国产精品ⅴa在线观看| 中文字幕一区视频| 六月丁香婷婷色狠狠久久| 国产无一区二区| 亚洲欧美另类久久久精品| 亚洲午夜视频在线观看| 国产精品系列在线播放| 一本色道综合亚洲| 精品国产乱码久久久久久图片 | 日韩精品乱码av一区二区| 欧美一区二区视频网站| 亚洲人123区| 精品无码三级在线观看视频 | 欧美亚洲一区二区在线| 国产亚洲精品久| 日韩电影在线一区| 欧美色图片你懂的| 国产欧美日韩精品在线| 国产资源在线一区| 欧美高清视频一二三区 | 国产成人一级电影| 日韩免费观看高清完整版 | 最新热久久免费视频| 国产综合色在线| 久久久久亚洲蜜桃| 狠狠色丁香九九婷婷综合五月| 911精品产国品一二三产区| 91女神在线视频| 欧美日韩在线观看一区二区 | 日韩视频免费观看高清在线视频| 夜夜亚洲天天久久| 色综合天天综合网国产成人综合天 | 国产精品视频免费| 国产成人免费高清| 国产精品网站导航| 91行情网站电视在线观看高清版| 国产亚洲短视频| 日韩免费高清视频| 精品一区二区三区在线观看国产 | 中文字幕一区不卡| 91在线观看美女| 亚洲精品国产视频| 欧美一级理论性理论a| 久久99最新地址| 亚洲日韩欧美一区二区在线| av不卡免费在线观看| 欧美日韩一级片网站| 久久爱www久久做| 亚洲人精品一区| 日韩一区二区在线免费观看| 懂色av一区二区夜夜嗨| 国产精品色在线观看| 欧美日韩久久久久久| 成人动漫一区二区三区| 五月激情综合网| 99久久久久久99| 日产国产高清一区二区三区| 国产精品成人免费| 综合色天天鬼久久鬼色| 精品夜夜嗨av一区二区三区| 中文字幕在线免费不卡| 欧美日韩视频一区二区| 色综合婷婷久久| 国产69精品久久777的优势| 日本美女一区二区三区视频| 亚洲综合另类小说| 日韩伦理电影网| 1区2区3区国产精品| 国产精品午夜在线观看| 久久久午夜精品理论片中文字幕| 欧美一级视频精品观看| 欧美专区亚洲专区| 欧美日韩在线免费视频| 色综合久久久久网| 91麻豆国产香蕉久久精品| 成人激情免费电影网址| 99久久免费视频.com| 色哟哟一区二区在线观看 | 日本三级亚洲精品| 亚洲国产sm捆绑调教视频| 亚欧色一区w666天堂| 免费精品99久久国产综合精品| 日韩国产精品大片| 久久一日本道色综合| 日韩一区二区精品| 国产亚洲精品资源在线26u| 国产精品蜜臀在线观看| 国产女人aaa级久久久级| 亚洲天堂av一区| 亚洲一区免费在线观看| 久久疯狂做爰流白浆xx| 国产大陆a不卡| 欧美一区二区三区白人| 欧美午夜片在线看| 欧美人动与zoxxxx乱| 欧美精品久久久久久久久老牛影院| 91超碰这里只有精品国产| 国产视频一区二区在线| 亚洲成人在线网站| 777午夜精品视频在线播放| 2022国产精品视频| 亚洲韩国精品一区| 成人国产电影网| 日韩一级黄色片| 亚洲精品日产精品乱码不卡| 热久久久久久久| 色婷婷综合五月| 国产精品久久久久久久久搜平片 | 精品99一区二区三区| 亚洲天堂成人网| 成人精品一区二区三区中文字幕| 欧美一卡2卡3卡4卡| 亚洲精品乱码久久久久| 久久精品国产99国产精品| 欧美三片在线视频观看| 久久久青草青青国产亚洲免观| 五月天激情综合网| 在线播放中文一区| 麻豆精品视频在线| 精品国产99国产精品| 精品一区二区三区在线观看国产 | 色综合久久66| 亚洲男同性恋视频| 欧美色精品天天在线观看视频| 日韩毛片视频在线看| 色偷偷一区二区三区| 亚洲精品成人在线| 欧美一区二区三区在线观看| 首页综合国产亚洲丝袜| 欧美国产乱子伦| 免费人成精品欧美精品| 国产亚洲一二三区| 色婷婷久久99综合精品jk白丝| 1024国产精品| 91国产免费看| 久久国产精品72免费观看| 国产亚洲欧美日韩在线一区| 91丨porny丨户外露出| 天堂va蜜桃一区二区三区漫画版 | 欧美日韩一级二级三级| 国产原创一区二区| 亚洲香肠在线观看| 欧美成人vps| 欧美体内she精视频| 国产盗摄一区二区| 轻轻草成人在线| 亚洲三级电影全部在线观看高清| 欧美群妇大交群中文字幕| 成人免费毛片片v| 亚洲成人一区在线| 国产日产精品一区| 欧美一区二区视频在线观看2022| 成人h精品动漫一区二区三区| 精品在线一区二区三区| 亚洲国产精品一区二区www在线 | 欧洲一区在线电影| a级高清视频欧美日韩| 久久99精品久久久久久| 日韩一区精品视频| 午夜精品视频在线观看| 亚洲国产va精品久久久不卡综合 | 亚洲免费观看在线视频| 国产精品伦理一区二区| 国产精品理伦片| 国产日韩欧美一区二区三区乱码 | 免费欧美高清视频| 午夜天堂影视香蕉久久| 在线亚洲+欧美+日本专区| 狠狠色狠狠色综合日日91app| 蜜臀国产一区二区三区在线播放| 亚洲资源在线观看| 日本aⅴ免费视频一区二区三区| 日韩高清在线观看| 日产国产高清一区二区三区 | 成人影视亚洲图片在线|