?? inserttag.java
字號:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: InsertTag.java
package mediastore.web.tag;
import java.util.Hashtable;
import java.util.Stack;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.JspTag;
import javax.servlet.jsp.tagext.TagSupport;
public class InsertTag extends TagSupport
implements JspTag
{
private String template;
private Stack stack;
public InsertTag()
{
}
public void setTemplate(String template)
{
this.template = template;
}
public int doStartTag()
throws JspException
{
stack = getStack();
stack.push(new Hashtable());
return 1;
}
public int doEndTag()
throws JspException
{
try
{
pageContext.include(template);
}
catch(Exception ex)
{
ex.printStackTrace();
throw new JspException(ex.getMessage());
}
stack.pop();
return 6;
}
public void release()
{
template = null;
stack = null;
}
public Stack getStack()
{
Stack s = (Stack)pageContext.getAttribute("template-stack", 2);
if(s == null)
{
s = new Stack();
pageContext.setAttribute("template-stack", s, 2);
}
return s;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -