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

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

?? writetag.java

?? 一個(gè)社區(qū)系統(tǒng)
?? JAVA
字號(hào):
package com.laoer.bbscs.web.tag;

import java.util.Locale;
import java.text.SimpleDateFormat;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.Format;

import java.text.DecimalFormat;
import java.text.NumberFormat;
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.util.ResponseUtils;

import com.laoer.comm.util.*;
import com.laoer.bbscs.sys.*;
/**
 * <p>Title: TianYi BBS</p>
 * <p>Description: TianYi BBS System</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: LAOER.COM/TIANYISOFT.NET</p>
 * @author laoer
 * @version 6.0
 */

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;
  private String type;
  private boolean br;

  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 (RequestUtils.lookup(pageContext, name, scope) == null) {
        return (SKIP_BODY); // Nothing to output
      }
    }

    // Look up the requested property value
    Object value =
        RequestUtils.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 (type != null && type.equals("note")) {
      if (SysInfo.getInstance().getNotehtml() == 0){
        if (br) {
          ResponseUtils.write(pageContext,
                              Util.replaceBr(ResponseUtils.filter(output)));
        }
        else {
          ResponseUtils.write(pageContext, ResponseUtils.filter(output));
        }
      }
      else {
        if (br) {
          ResponseUtils.write(pageContext, Util.replaceBr(output));
        }
        else {
          ResponseUtils.write(pageContext, output);
        }
        // Continue processing this page
      }
    }
    else {
      if (filter) {
        if (br) {
          ResponseUtils.write(pageContext,
                              Util.replaceBr(ResponseUtils.filter(output)));
        }
        else {
          ResponseUtils.write(pageContext, ResponseUtils.filter(output));
        }

      }
      else {
        if (br) {
          ResponseUtils.write(pageContext, Util.replaceBr(output));
        }
        else {
          ResponseUtils.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 = RequestUtils.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.
   *
   * @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 =
        RequestUtils.retrieveUserLocale(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 e = new JspException(messages.getMessage(
                "write.format", formatString));
            RequestUtils.saveException(pageContext, e);
            throw e;
          }
        }

      }
      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) {
            formatStrFromResources = true;

          }
        }

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

      }
    }

    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;

  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public boolean isBr() {
    return br;
  }

  public void setBr(boolean br) {
    this.br = br;
  }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美剧情片在线观看| 精品一区二区三区蜜桃| 欧美一级夜夜爽| 成人免费黄色大片| 奇米影视一区二区三区| 成人欧美一区二区三区黑人麻豆| 欧美一区二区在线观看| 色婷婷狠狠综合| 成人av中文字幕| 国内精品视频一区二区三区八戒| 亚洲一区二区五区| 日韩毛片高清在线播放| 久久精品日产第一区二区三区高清版 | 久久青草国产手机看片福利盒子 | heyzo一本久久综合| 另类小说一区二区三区| 水野朝阳av一区二区三区| 亚洲国产电影在线观看| 精品噜噜噜噜久久久久久久久试看 | 欧美精品一区二区三区四区| 欧美亚洲丝袜传媒另类| 成人爱爱电影网址| 国产成人免费网站| 久久99精品国产| 韩国欧美国产1区| 日本最新不卡在线| 亚洲成人动漫av| 亚洲一区二区欧美激情| 亚洲制服丝袜av| 亚洲日本一区二区三区| 亚洲桃色在线一区| 国产精品久久久久桃色tv| 日本一区二区综合亚洲| 国产日韩欧美一区二区三区综合| 欧美成人在线直播| 精品精品国产高清一毛片一天堂| 91精品国产91久久综合桃花| 5858s免费视频成人| 欧美日韩性生活| 91精品综合久久久久久| 在线成人av网站| 欧美电影免费观看高清完整版在线观看 | 国产.欧美.日韩| 成人精品小蝌蚪| 成人97人人超碰人人99| 91麻豆精品秘密| 91久久精品国产91性色tv | 欧美变态tickling挠脚心| 日韩欧美国产综合在线一区二区三区| 日韩精品一区二区三区在线观看| 欧美www视频| 国产欧美日韩另类视频免费观看| 国产农村妇女精品| 一区视频在线播放| 亚洲一卡二卡三卡四卡无卡久久| 亚洲成年人影院| 蜜臀久久久99精品久久久久久| 麻豆视频一区二区| 粉嫩aⅴ一区二区三区四区五区| 日韩欧美亚洲国产精品字幕久久久| 日韩女优av电影| 国产欧美一区二区精品性色超碰| 国产精品久久久久一区二区三区共| 亚洲精选在线视频| 性欧美疯狂xxxxbbbb| 久久69国产一区二区蜜臀| 国产精品综合网| 97精品久久久久中文字幕| 欧美色成人综合| 日韩欧美国产一二三区| 中文字幕国产一区二区| 伊人色综合久久天天人手人婷| 三级精品在线观看| 国产精品主播直播| 91福利小视频| 日韩精品最新网址| 亚洲女同一区二区| 免费在线观看一区二区三区| 从欧美一区二区三区| 欧美亚洲精品一区| 欧美精品一区二区三区久久久| 国产精品每日更新在线播放网址| 亚洲综合免费观看高清在线观看| 经典三级在线一区| 欧美影视一区二区三区| 欧美精品一区二区不卡| 亚洲另类春色国产| 国内久久精品视频| 欧美性高清videossexo| 久久久久久久精| 亚洲综合视频在线| 国产ts人妖一区二区| 欧美放荡的少妇| 中文字幕在线观看一区二区| 亚洲超碰精品一区二区| 粉嫩欧美一区二区三区高清影视| 欧美性做爰猛烈叫床潮| 中文字幕高清一区| 老司机免费视频一区二区| 欧美性生活影院| 国产精品久久久久国产精品日日| 日本不卡一二三| 色综合天天性综合| 久久久久久99精品| 青青草97国产精品免费观看| 91在线视频免费91| 国产午夜三级一区二区三| 91国偷自产一区二区开放时间| 日本va欧美va精品| 99精品欧美一区二区三区综合在线| 日韩一区二区三区免费看| 韩国v欧美v日本v亚洲v| 欧美在线短视频| 日韩理论片一区二区| 国产成人在线视频免费播放| 欧美videos大乳护士334| 午夜精品福利一区二区蜜股av | 亚洲精品在线电影| 亚洲国产日韩精品| 99国产精品99久久久久久| 国产欧美精品一区| 久久99久久99| 欧美成va人片在线观看| 美国十次综合导航| 日韩欧美专区在线| 日韩av电影一区| 欧美一区二区三区白人| 天堂va蜜桃一区二区三区漫画版| 欧美色爱综合网| 亚洲成人av电影| 欧美日韩精品一区二区天天拍小说| 玉足女爽爽91| 欧洲国内综合视频| 丝袜国产日韩另类美女| 麻豆精品在线视频| 欧美一区二区网站| 欧美a级一区二区| 欧美一区二区视频在线观看2020| 亚洲一区二区三区四区五区黄| 91麻豆国产自产在线观看| 亚洲欧洲av在线| 色综合网站在线| 亚洲精品福利视频网站| 色久优优欧美色久优优| 亚洲日本韩国一区| 欧洲精品一区二区三区在线观看| 一级中文字幕一区二区| 欧美自拍丝袜亚洲| 国产精品99久久不卡二区| 久久久久99精品国产片| 粉嫩13p一区二区三区| 国产精品精品国产色婷婷| 色婷婷久久一区二区三区麻豆| 亚洲综合一二三区| 56国语精品自产拍在线观看| 美女网站在线免费欧美精品| 欧美xxxxxxxxx| 成人av在线一区二区三区| 国产精品久久久久毛片软件| 成人精品小蝌蚪| 亚洲日本青草视频在线怡红院| 欧美亚洲高清一区二区三区不卡| 午夜av一区二区三区| 欧美一级久久久| 丁香另类激情小说| 亚洲欧美偷拍卡通变态| 日韩一区二区三区免费观看| 国产精品99久久久久久久vr| 亚洲欧美日韩一区| 3d动漫精品啪啪一区二区竹菊| 国产一区在线视频| 综合色天天鬼久久鬼色| 正在播放亚洲一区| 国产a精品视频| 亚洲一区影音先锋| 精品国产网站在线观看| eeuss鲁片一区二区三区| 亚洲va欧美va人人爽| 久久丝袜美腿综合| 欧美伊人久久久久久久久影院 | 91福利在线导航| 九九**精品视频免费播放| 日韩理论片在线| 日韩午夜中文字幕| k8久久久一区二区三区| 日韩av中文字幕一区二区| 欧美国产日韩精品免费观看| 欧美视频一区二区三区四区| 国产成人小视频| 日本大胆欧美人术艺术动态| 国产精品久久久久7777按摩| 日韩西西人体444www| 色88888久久久久久影院野外| 久久国产精品一区二区| 日韩美女视频一区二区| 久久久蜜臀国产一区二区| 欧美午夜一区二区三区免费大片| 欧美精品久久久久久久久老牛影院| 免费视频最近日韩| 亚洲精品你懂的|