⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printtag.java

📁 招标投标网上系统
💻 JAVA
字号:
/*
 * $Id: InsertTag.java,v 1.3 2001/10/26 22:55:55 ro89390 Exp $
 * Copyright 2000 Sun Microsystems, Inc. All rights reserved.
 * Copyright 2000 Sun Microsystems, Inc. Tous droits r?erv?.
 */

package com.neusoft.taglibs.smart;

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

/**
 * This class is an easy interface to the JSP template or other
 * text that needs to be inserted.
 */

public class PrintTag
    extends TagSupport {

  private String id = null;

  /**
   * default constructor
   */
  public PrintTag() {
    super();
  }

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

  public int doStartTag() throws JspTagException {
    //System.out.printn("start tag-------");
    try {
      pageContext.getOut().flush();
    }
    catch (Exception e) {
      // do nothing
    }

    return SKIP_BODY;
  }

  public int doEndTag() throws JspTagException {
    try {

      HashMap pageinformation = (HashMap) pageContext.getServletContext().
          getAttribute("pageinformation");
      //System.out.printn(id);
      pageContext.getOut().print( (String) pageinformation.get(id));
      //System.out.printn((String)pageinformation.get(id));
    }
    catch (Exception ex) {

      System.err.println("PrintTag:doEndTag caught: " + ex);
    }
    return EVAL_PAGE;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -