0,0 → 1,82 |
package ak.backpath.taglib; |
|
import javax.servlet.jsp.JspException; |
import javax.servlet.jsp.tagext.TagSupport; |
import org.apache.struts.util.ResponseUtils; |
import ak.backpath.BackPath; |
|
public abstract class StackTagBase extends TagSupport |
{ |
protected String backPathKey = BackPath.DEFAULT_KEY; |
|
public String getBackPathKey() |
{ |
return this.backPathKey; |
} |
|
public void setBackPathKey(String backPathKey) |
{ |
this.backPathKey = backPathKey; |
} |
|
protected String backPathParam = BackPath.DEFAULT_PARAM; |
|
public String getBackPathParam() |
{ |
return this.backPathParam; |
} |
|
public void setBackPathParam(String backPathParam) |
{ |
this.backPathParam = backPathParam; |
} |
|
protected String backPathIgnore = null; |
|
public String getBackPathIgnore() |
{ |
return this.backPathIgnore; |
} |
|
public void setBackPathIgnore(String backPathIgnore) |
{ |
this.backPathIgnore = backPathIgnore; |
} |
|
protected boolean zip = BackPath.DEFAULT_ZIP; |
|
public boolean getZip() |
{ |
return this.zip; |
} |
|
public void setZip(boolean zip) |
{ |
this.zip = zip; |
} |
|
public void release() |
{ |
super.release(); |
backPathKey = BackPath.DEFAULT_KEY; |
backPathParam = BackPath.DEFAULT_PARAM; |
backPathIgnore = null; |
zip = BackPath.DEFAULT_ZIP; |
} |
|
public int doStartTag() throws JspException |
{ |
String stack = getStack(); |
if(stack == null) stack = ""; |
ResponseUtils.write(pageContext, stack); |
return SKIP_BODY; |
} |
|
protected BackPath findBackPath() throws JspException |
{ |
return TaglibUtils.findBackPath(pageContext, backPathKey, |
backPathParam, backPathIgnore, zip); |
} |
|
protected abstract String getStack() throws JspException; |
} |