本文整理了Java中javax.servlet.jsp.tagext.Tag.doStartTag()
方法的一些代码示例,展示了Tag.doStartTag()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.doStartTag()
方法的具体详情如下:
包路径:javax.servlet.jsp.tagext.Tag
类名称:Tag
方法名:doStartTag
[英]Process the start tag for this instance. This method is invoked by the JSP page implementation object.
The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated.
This method returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED to indicate that the body of the action should be evaluated or SKIP_BODY to indicate otherwise.
When a Tag returns EVAL_BODY_INCLUDE the result of evaluating the body (if any) is included into the current "out" JspWriter as it happens and then doEndTag() is invoked.
BodyTag.EVAL_BODY_BUFFERED is only valid if the tag handler implements BodyTag.
The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doStartTag(), except for a tag handler implementing BodyTag whose doStartTag() method returns BodyTag.EVAL_BODY_BUFFERED.
[中]处理此实例的开始标记。此方法由JSP页面实现对象调用。
doStartTag方法假定已经设置了属性pageContext和parent。它还假设已经设置了作为属性公开的任何属性。调用此方法时,尚未对主体进行评估。
此方法返回标记。EVAL_BODY_INCLUDE或BodyTag。EVAL_BODY_BUFFERED表示应该对动作的主体进行评估,或SKIP_BODY表示其他情况。
当一个标记返回EVAL_BODY_INCLUDE时,计算BODY(如果有)的结果会被包含在当前的“out”JspWriter中,然后调用doEndTag()。
贴身标签。只有在标记处理程序实现BodyTag时,EVAL_BODY_BUFFERED才有效。
调用doStartTag()后,JSP容器将重新同步任何AT_BEGIN和嵌套变量(由关联的TagExtraInfo或TLD定义)的值,但实现BodyTag的标记处理程序除外,其doStartTag()方法返回BodyTag。评估身体缓冲。
代码示例来源:origin: org.freemarker/freemarker
public int onStart()
throws TemplateModelException {
try {
int dst = tag.doStartTag();
switch(dst) {
case Tag.SKIP_BODY:
代码示例来源:origin: com.mockrunner/mockrunner-tag
/**
* Delegates to wrapped tag.
*/
public int doStartTag() throws JspException
{
return tag.doStartTag();
}
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.3-j2ee1.3
/**
* Delegates to wrapped tag.
*/
public int doStartTag() throws JspException
{
return tag.doStartTag();
}
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.4-j2ee1.3
/**
* Delegates to wrapped tag.
*/
public int doStartTag() throws JspException
{
return tag.doStartTag();
}
代码示例来源:origin: com.pojosontheweb/ttt-stripes
@Override
protected void doRender(TttWriter tw) throws Exception {
// try {
tag.doStartTag();
tag.doEndTag();
// } finally {
// tag.release();
// }
}
}
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.3-j2ee1.3
/**
* Calls the <code>doStartTag</code> method of the current tag.
* @return the result of <code>doStartTag</code>
* @throws <code>RuntimeException</code>, if the tag
* is a simple tag
*/
public int doStartTag()
{
if(null == tag)
{
throw new RuntimeException("No current tag set");
}
/*if(isSimpleTag())
{
throw new RuntimeException("Cannot call doStartTag() on simple tags");
}*/
try
{
return ((Tag)tag).doStartTag();
}
catch(JspException exc)
{
throw new NestedApplicationException(exc);
}
}
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.4-j2ee1.3
/**
* Calls the <code>doStartTag</code> method of the current tag.
* @return the result of <code>doStartTag</code>
* @throws <code>RuntimeException</code>, if the tag
* is a simple tag
*/
public int doStartTag()
{
if(null == tag)
{
throw new RuntimeException("No current tag set");
}
/*if(isSimpleTag())
{
throw new RuntimeException("Cannot call doStartTag() on simple tags");
}*/
try
{
return ((Tag)tag).doStartTag();
}
catch(JspException exc)
{
throw new NestedApplicationException(exc);
}
}
代码示例来源:origin: mockobjects/mockobjects-jdk1.4-j2ee1.3
/**
* Assert that the return value of doStartTag is equal to an expectedValue
* @param expectedValue value to check against doStartTag
*/
public void assertDoStartTag(final int expectedValue) throws JspException {
testSubject.setPageContext(pageContext);
checkReturnValue("doStartTag", expectedValue, testSubject.doStartTag());
}
代码示例来源:origin: org.seasar.teeda/teeda-extension
protected void processTag(final PageContext pageContext, final Tag tag)
throws JspException {
if (Tag.SKIP_BODY != tag.doStartTag()) {
processChildren(pageContext, tag);
tag.doEndTag();
}
}
代码示例来源:origin: com.mockrunner/mockrunner-tag
/**
* Calls the <code>doStartTag</code> method of the current tag.
* @return the result of <code>doStartTag</code>
* @throws <code>RuntimeException</code>, if the tag
* is a simple tag
*/
public int doStartTag()
{
if(null == tag)
{
throw new RuntimeException("No current tag set");
}
if(isSimpleTag())
{
throw new RuntimeException("Cannot call doStartTag() on simple tags");
}
try
{
return ((Tag)tag).doStartTag();
}
catch(JspException exc)
{
throw new NestedApplicationException(exc);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
public int onStart()
throws TemplateModelException {
try {
int dst = tag.doStartTag();
switch(dst) {
case Tag.SKIP_BODY:
代码示例来源:origin: org.freemarker/freemarker-gae
public int onStart()
throws TemplateModelException {
try {
int dst = tag.doStartTag();
switch(dst) {
case Tag.SKIP_BODY:
代码示例来源:origin: org.freemarker/com.springsource.freemarker
int dst = tag.doStartTag();
switch(dst) {
case Tag.SKIP_BODY:
代码示例来源:origin: org.apache.velocity.tools/velocity-tools-view-jsp
PageContext pageContext, Tag tag) throws JspException
int result = tag.doStartTag();
if (tag instanceof BodyTag)
代码示例来源:origin: com.liferay.faces/liferay-faces-portal
tag.doStartTag();
tag.doEndTag();
代码示例来源:origin: liferay/liferay-faces
tag.doStartTag();
tag.doEndTag();
代码示例来源:origin: org.metawidget.modules/metawidget-all
int returnCode = tag.doStartTag();
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.3-j2ee1.3
try
int result = tag.doStartTag();
if(Tag.EVAL_BODY_INCLUDE == result)
代码示例来源:origin: com.mockrunner/mockrunner-jdk1.4-j2ee1.3
try
int result = tag.doStartTag();
if(Tag.EVAL_BODY_INCLUDE == result)
代码示例来源:origin: com.mockrunner/mockrunner-tag
try
int result = tag.doStartTag();
if(Tag.EVAL_BODY_INCLUDE == result)
内容来源于网络,如有侵权,请联系作者删除!