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

📄 insertpagetag.java.svn-base

📁 一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业
💻 SVN-BASE
字号:
package com.nsi.taglib;

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

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.nsi.constants.AppConstants;
import com.nsi.util.ValHelper;

public class InsertPageTag extends TagSupport
{
	private static final long serialVersionUID = 6994923126682790629L;
	private static Log log = LogFactory.getLog(InsertPageTag.class);
	private String jspname;
	/**
	 * constructor of InsertPageTag
	 */
	public InsertPageTag()
	{
		jspname = AppConstants.EMPTY_STRING;
	}
	/**
	 * @param jspname
	 */
	public void setJspname(String jspname)
	{
		this.jspname = jspname;
	}
	public int doStartTag() throws JspTagException
	{
		try
		{
			super.pageContext.getOut().flush();
		}
		catch(Exception ex)
		{
			log.error("doStartTag() flushing content -- caught Exception : ", ex);
		}
		return SKIP_BODY;
	}
	/**
	 * @see javax.servlet.jsp.tagext.TagSupport#doEndTag()
	 */
	public int doEndTag() throws JspTagException
	{
		try
		{
			if(ValHelper.getInstance().isNotNullAndEmpty(jspname))
			{
				super.pageContext.getRequest().getRequestDispatcher(jspname).include(super.pageContext.getRequest(), super.pageContext.getResponse());
			}
		}
		catch(Exception ex)
		{
			log.error("doEndTag() --  caught Exception: ", ex);
		}
		return EVAL_PAGE;
	}
}

⌨️ 快捷键说明

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