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

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

?? weekdaystag.java

?? jakarta-taglibs
?? JAVA
字號:
/*
 * 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.taglibs.datetime;

import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

/**
 * JSP Tag <b>weekdays</b>, used to loop through the days of the week
 * so that weekday names can be accessed by using the standard
 * JSP &lt;jsp:getProperty&gt; tag.
 * <p>
 * The script variable of name <b>id</b> is availble only within the
 * body of the <b>weekdays</b> tag.
 * <p>
 * Loops through all the weekdays.
 * <p>
 * If the optional attribute <b>locale</b> is true, the weekday names
 * are formatted for the clients locale if known.
 * <p>
 * The optional attribute <b>localeRef</b> can be used to specify
 * the name of a page, session, application, or request scope attribute
 * of type java.util.Locale to use.
 * <p>
 * JSP Tag Lib Descriptor
 * <p><pre>
 * &lt;name&gt;weekdays&lt;/name&gt;
 * &lt;tagclass&gt;org.apache.taglibs.datetime.WeekdaysTag&lt;/tagclass&gt;
 * &lt;teiclass&gt;org.apache.taglibs.datetime.WeekdaysTEI&lt;/teiclass&gt;
 * &lt;bodycontent&gt;JSP&lt;/bodycontent&gt;
 * &lt;info&gt;Loop through all the days of the week.&lt;/info&gt;
 *   &lt;attribute&gt;
 *     &lt;name&gt;id&lt;/name&gt;
 *     &lt;required&gt;true&lt;/required&gt;
 *     &lt;rtexprvalue&gt;false&lt;/rtexprvalue&gt;
 *   &lt;/attribute&gt;
 *   &lt;attribute&gt;
 *     &lt;name&gt;locale&lt;/name&gt;
 *     &lt;required&gt;false&lt;/required&gt;
 *     &lt;rtexprvalue&gt;false&lt;/rtexprvalue&gt;
 *   &lt;/attribute&gt;
 *   &lt;attribute&gt;
 *     &lt;name&gt;localeRef&lt;/name&gt;
 *     &lt;required&gt;false&lt;/required&gt;
 *     &lt;rtexprvalue&gt;false&lt;/rtexprvalue&gt;
 *   &lt;/attribute&gt;
 * </pre>
 *
 * @author Glenn Nielsen
 */

public class WeekdaysTag extends BodyTagSupport
{
    // Static constants                     
    private static String PATTERN = "yyyy";
                                           
    // weekdays tag attributes
    private boolean locale_flag = false;
    private String localeRef = null;

    private String [] short_weekdays = null;
    private String [] long_weekdays = null;
    private int day = 0;
    private int day_num = 1;

    /**
     * Initializes tag so it can loop through the weekdays of the year.
     *
     * @return EVAL_BODY_TAG
     */
    public final int doStartTag() throws JspException
    {
        // Initialize variables                      
        day = 0;
        day_num = 1;

        SimpleDateFormat sdf;
        if( localeRef != null ) {                          
            Locale locale = (Locale)pageContext.findAttribute(localeRef);
            if( locale == null ) {
                throw new JspException(
                    "datetime amPms tag could not find locale for localeRef \"" +
                    localeRef + "\".");
            }
            
            sdf = new SimpleDateFormat(PATTERN,locale);
        } else if( locale_flag ) {
            sdf = new SimpleDateFormat(PATTERN,
                      (Locale)pageContext.getRequest().getLocale());
        } else {
            sdf = new SimpleDateFormat(PATTERN);
        }

	DateFormatSymbols dfs = sdf.getDateFormatSymbols();
	short_weekdays = dfs.getShortWeekdays();
	long_weekdays = dfs.getWeekdays();
	// Make sure we skip any blank weekday array elements
	while( day < long_weekdays.length &&
	    (long_weekdays[day] == null || long_weekdays[day].length() == 0) )
		day++;
        if( day >= short_weekdays.length )
            return SKIP_BODY;

	pageContext.setAttribute(id,this,PageContext.PAGE_SCOPE);
	return EVAL_BODY_TAG;
    }

    /**
     * Method called at end of each weekdays tag.
     *
     * @return EVAL_BODY_TAG if there is another weekday, or SKIP_BODY if there are no more weekdays
     */
    public final int doAfterBody() throws JspException
    {
	// See if we are done looping through weekdays
	day++;
	day_num++;
        if( day >= short_weekdays.length )
            return SKIP_BODY;
	// Make sure we skip any blank weekday array elements
        while( day < long_weekdays.length &&
            (long_weekdays[day] == null || long_weekdays[day].length() == 0) )
                day++;

	if( day >= short_weekdays.length )
	    return SKIP_BODY;

	// There is another weekday, so loop again
	return EVAL_BODY_TAG;
    }

    /**
     * Method called at end of Tag
     * @return EVAL_PAGE
     */
    public final int doEndTag() throws JspException
    {
        pageContext.removeAttribute(id,PageContext.PAGE_SCOPE);
	try
	{
	    if(bodyContent != null)
	    bodyContent.writeOut(bodyContent.getEnclosingWriter());
	} catch(java.io.IOException e)
	{
	    throw new JspException("IO Error: " + e.getMessage());
	}
	return EVAL_PAGE;
    }

    /**
     * Locale flag, if set to true, use weekday names
     * for client's preferred locale if known.
     *
     * @param boolean either <b>true</b> or <b>false</b>
     */
    public final void setLocale(boolean flag)
    {
        locale_flag = flag;
    }

    /**
     * Provides a key to search the page context for in order to get the
     * java.util.Locale to use.
     *
     * @param String name of locale attribute to use
     */
    public void setLocaleRef(String value)
    {
        localeRef = value;
    }

    /**
     * Returns the short name of the weekday.
     * <p>
     * &lt;jsp:getProperty name=<i>"id"</i> property="shortWeekday"/&gt;
     *
     * @return String - short name of the weekday
     */
    public final String getShortWeekday()
    {
	return short_weekdays[day];
    }

    /**
     * Returns the long name of the weekday.
     * <p>
     * &lt;jsp:getProperty name=<i>"id"</i> property="weekday"/&gt;
     *
     * @return String - long name of the weekday
     */
    public final String getWeekday()
    {  
        return long_weekdays[day];
    }

    /**
     * Returns the number of the day of the week.
     * <p> 
     * &lt;jsp:getProperty name=<i>"id"</i> property="dayOfWeek"/&gt;
     *  
     * @return String - number of the day of the week
     */     
    public final String getDayOfWeek()
    {   
        return "" + day_num;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清免费在线播放| 大尺度一区二区| 亚洲精品一卡二卡| 国产精品久久久久四虎| 久久精品综合网| 久久精品一区二区三区四区| 久久尤物电影视频在线观看| 精品日韩av一区二区| www欧美成人18+| 国产人久久人人人人爽| 国产三级一区二区三区| 久久综合色一综合色88| 欧美tickle裸体挠脚心vk| www成人在线观看| 欧美精品一区二区三区很污很色的 | 久久精品夜夜夜夜久久| 亚洲国产成人自拍| 亚洲欧洲日产国码二区| 亚洲欧美日韩国产中文在线| 一个色综合网站| 亚洲国产一区二区三区| 婷婷综合另类小说色区| 另类专区欧美蜜桃臀第一页| 国产在线精品一区二区| 国产成人精品亚洲777人妖| 国产一区二区久久| 国产成人自拍网| av一二三不卡影片| 欧美日本在线一区| 日韩精品资源二区在线| 久久先锋资源网| 亚洲老妇xxxxxx| 蜜桃av一区二区三区| 成人午夜精品一区二区三区| 91视频你懂的| 欧美电影影音先锋| 国产亚洲欧美日韩俺去了| 亚洲精品视频免费观看| 久久99精品国产麻豆不卡| 成人国产精品免费| 欧美又粗又大又爽| 亚洲精品在线一区二区| 日韩久久一区二区| 日韩高清一区在线| proumb性欧美在线观看| 欧美视频中文一区二区三区在线观看 | 91国偷自产一区二区使用方法| 欧美日韩国产免费一区二区| 精品国产人成亚洲区| 亚洲欧美aⅴ...| 久久精品噜噜噜成人88aⅴ| 91在线观看免费视频| 91精品国产综合久久国产大片| 中文字幕第一区综合| 美女爽到高潮91| 欧美性猛片aaaaaaa做受| 欧美精品一区二区在线观看| 亚洲激情网站免费观看| 国内精品久久久久影院色| 欧美性淫爽ww久久久久无| 中文在线资源观看网站视频免费不卡| 午夜一区二区三区在线观看| 国产91丝袜在线观看| 日韩欧美国产麻豆| 天堂资源在线中文精品| 91影院在线观看| 日本一区二区免费在线观看视频| 丝袜亚洲另类丝袜在线| 色哟哟一区二区| 国产日产欧产精品推荐色| 免费高清在线视频一区·| 日本久久电影网| 日av在线不卡| 欧洲精品一区二区三区在线观看| 国产日韩影视精品| 老司机午夜精品99久久| 欧美在线看片a免费观看| 中文字幕日韩精品一区| 成人精品一区二区三区四区| 日韩欧美国产三级电影视频| 视频一区视频二区中文| 日本道精品一区二区三区| 国产精品久久久久影院| 国产成人精品免费一区二区| 久久综合99re88久久爱| 久久99国产精品久久99果冻传媒| 91麻豆精品国产自产在线观看一区 | 成人黄色国产精品网站大全在线免费观看 | 性做久久久久久久久| 一本大道久久a久久综合| 亚洲丝袜精品丝袜在线| 成人va在线观看| 国产精品美女久久久久aⅴ| 国产精品66部| 精品在线观看视频| 久久午夜羞羞影院免费观看| 激情图片小说一区| 26uuu精品一区二区在线观看| 激情成人综合网| 久久精品无码一区二区三区| 高清国产午夜精品久久久久久| 日本一区二区三区高清不卡| 成人精品gif动图一区| 一区二区三区av电影| 欧美日韩精品久久久| 日本 国产 欧美色综合| 精品国产一区二区三区四区四| 久久国产乱子精品免费女| 久久伊人中文字幕| 成人av免费观看| 亚洲一区二区在线观看视频| 欧美视频一二三区| 蜜桃91丨九色丨蝌蚪91桃色| 久久久久高清精品| 成人黄色电影在线| 午夜视频久久久久久| 精品国产一区久久| 成人激情午夜影院| 偷拍日韩校园综合在线| 久久久蜜桃精品| 色综合久久综合网| 麻豆91精品视频| 国产精品美女一区二区| 欧美电影在哪看比较好| 国产盗摄一区二区三区| 亚洲在线中文字幕| 久久久久久久久岛国免费| 99精品热视频| 毛片av一区二区| 亚洲精品一二三四区| 精品国产乱码久久久久久牛牛| 99国产精品久久久久久久久久久 | 色综合久久久久| 久久成人免费网| 亚洲欧洲综合另类| 精品sm在线观看| 欧美色网站导航| 粉嫩一区二区三区在线看| 亚洲成人av免费| 国产精品嫩草99a| 欧美丰满嫩嫩电影| 99久久免费精品| 国产乱码精品1区2区3区| 亚洲黄色免费网站| 国产欧美日韩不卡免费| 欧美日本韩国一区| 欧美中文字幕久久| 色婷婷久久综合| av中文一区二区三区| 国产一区不卡视频| 日韩亚洲欧美中文三级| 91高清视频在线| 色乱码一区二区三区88 | 免费在线一区观看| 一区二区三区四区中文字幕| 国产欧美精品区一区二区三区 | 欧美aⅴ一区二区三区视频| 精品国产免费久久| av电影天堂一区二区在线| 日本va欧美va精品| 日韩高清不卡一区二区三区| 一区二区三区国产| 欧美国产一区二区| 精品日韩欧美在线| 欧美日韩在线不卡| 91久久精品一区二区三| 国产精品一区二区在线播放 | 国产福利精品导航| 国产一区二区在线视频| 久久97超碰色| 久久爱另类一区二区小说| 蜜桃精品视频在线| 天天操天天干天天综合网| 国产精品美女久久久久久久久久久 | 久久蜜桃香蕉精品一区二区三区| 欧美亚洲动漫制服丝袜| 成人av午夜电影| 精品一区二区三区在线观看| 蜜桃视频免费观看一区| 伦理电影国产精品| 久久精品av麻豆的观看方式| 亚洲成人av在线电影| 亚洲一区日韩精品中文字幕| 亚洲精品亚洲人成人网| 国产精品久久夜| 亚洲色图都市小说| 椎名由奈av一区二区三区| 久久尤物电影视频在线观看| 久久亚洲二区三区| 国产色综合一区| 亚洲欧美一区二区三区极速播放| 亚洲色图在线播放| 亚洲精品美国一| 亚洲免费成人av| 婷婷开心久久网| 激情综合网天天干| 99精品热视频| 日韩欧美国产三级| 亚洲伦理在线免费看| 久久成人免费电影|