javax.servlet.jsp.tagext.Tag.release()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中javax.servlet.jsp.tagext.Tag.release()方法的一些代码示例,展示了Tag.release()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.release()方法的具体详情如下:
包路径:javax.servlet.jsp.tagext.Tag
类名称:Tag
方法名:release

Tag.release介绍

[英]Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but there may be multiple invocations on doStartTag and doEndTag in between.
[中]调用标记处理程序以释放状态。页面编译器保证JSP页面实现对象将在所有标记处理程序上调用此方法,但在doStartTag和doEndTag之间可能有多个调用。

代码示例

代码示例来源:origin: org.freemarker/freemarker

@Override
public void close() {
  if (closed) {
    return;
  }
  closed = true;
  
  if (needPop) {
    pageContext.popWriter();
  }
  pageContext.popTopTag();
  try {
    if (isTryCatchFinally) {
      ((TryCatchFinally) tag).doFinally();
    }
    // No pooling yet
    tag.release();
  } finally {
    if (needDoublePop) {
      pageContext.popWriter();
    }
  }
}

代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-2.1

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
  handlers[i].release();
}
}

代码示例来源:origin: com.mockrunner/mockrunner-jdk1.4-j2ee1.3

/**
 * Delegates to wrapped tag.
 */
public void release()
{
  tag.release();
}

代码示例来源:origin: com.mockrunner/mockrunner-jdk1.3-j2ee1.3

/**
 * Delegates to wrapped tag.
 */
public void release()
{
  tag.release();
}

代码示例来源:origin: com.mockrunner/mockrunner-tag

/**
 * Delegates to wrapped tag.
 */
public void release()
{
  tag.release();
}

代码示例来源:origin: com.mockrunner/mockrunner-jdk1.3-j2ee1.3

/**
 * Calls the <code>release</code> method of the current tag.
 * @throws <code>RuntimeException</code>, if the tag
 *         is a simple tag
 */
public void release()
{
  /*if(isSimpleTag())
  {
    throw new RuntimeException("Cannot call release() on simple tags");
  }*/
  ((Tag)tag).release();
}

代码示例来源:origin: com.mockrunner/mockrunner-jdk1.4-j2ee1.3

/**
 * Calls the <code>release</code> method of the current tag.
 * @throws <code>RuntimeException</code>, if the tag
 *         is a simple tag
 */
public void release()
{
  /*if(isSimpleTag())
  {
    throw new RuntimeException("Cannot call release() on simple tags");
  }*/
  ((Tag)tag).release();
}

代码示例来源:origin: org.glassfish.web/jsp-impl

/**
 * Adds the given tag handler to this tag handler pool, unless this tag
 * handler pool has already reached its capacity, in which case the tag
 * handler's release() method is called.
 *
 * @param handler Tag handler to add to this tag handler pool
 */
public void reuse(Tag handler) {
  PerThreadData ptd=(PerThreadData)perThread.get();
if (ptd.current < (ptd.handlers.length - 1)) {
  ptd.handlers[++ptd.current] = handler;
  } else {
    handler.release();
  }
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Adds the given tag handler to this tag handler pool, unless this tag
 * handler pool has already reached its capacity, in which case the tag
 * handler's release() method is called.
 *
 * @param handler Tag handler to add to this tag handler pool
 */
public void reuse(Tag handler) {
  PerThreadData ptd=(PerThreadData)perThread.get();
if (ptd.current < (ptd.handlers.length - 1)) {
  ptd.handlers[++ptd.current] = handler;
  } else {
    handler.release();
  }
}

代码示例来源:origin: org.glassfish.web/jsp-impl

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
  handlers[i].release();
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: org.tinygroup/org.tinygroup.jspengine

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
  for (int i = current; i >= 0; i--) {
    handlers[i].release();
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
  }
}

代码示例来源:origin: org.glassfish.web/jakarta.servlet.jsp

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
    if (handlers[i] instanceof Tag) {
      ((Tag)handlers[i]).release();
    }
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: com.mockrunner/mockrunner-tag

/**
 * Calls the <code>release</code> method of the current tag.
 * @throws <code>RuntimeException</code>, if the tag
 *         is a simple tag
 */
public void release()
{
  if(isSimpleTag())
  {
    throw new RuntimeException("Cannot call release() on simple tags");
  }
  ((Tag)tag).release();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.jasper.glassfish

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
    if (handlers[i] instanceof Tag) {
      ((Tag)handlers[i]).release();
    }
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: org.glassfish.web/javax.servlet.jsp

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
    if (handlers[i] instanceof Tag) {
      ((Tag)handlers[i]).release();
    }
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: org.eclipse.jetty.orbit/org.apache.jasper.glassfish

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
    if (handlers[i] instanceof Tag) {
      ((Tag)handlers[i]).release();
    }
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: org.eclipse.jetty.toolchain/jetty-jsp-fragment

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
for (int i=current; i>=0; i--) {
    if (handlers[i] instanceof Tag) {
      ((Tag)handlers[i]).release();
    }
    if (resourceInjector != null) {
      resourceInjector.preDestroy(handlers[i]);
    }
}
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Calls the release() method of all available tag handlers in this tag
 * handler pool.
 */
public synchronized void release() {
  for (int i = current; i >= 0; i--) {
    handlers[i].release();
    try {
      instanceManager.destroyInstance(handlers[i]);
    } catch (Exception e) {
      log.warn("Error processing preDestroy on tag instance of "
          + handlers[i].getClass().getName(), e);
    }
  }
}

代码示例来源:origin: org.seasar.teeda/teeda-extension

public void process(final PageContext pageContext, final Tag parentTag)
    throws JspException {
  final Tag tag = (Tag) ClassUtil.newInstance(tagClass);
  try {
    process(pageContext, tag, parentTag);
  } finally {
    tag.release();
  }
}

代码示例来源:origin: org.seasar.mayaa/mayaa

protected void releaseLoadedTag() {
  Tag tag = (Tag) CycleUtil.getLocalVariable(LOADED_TAG_KEY, this, null);
  CycleUtil.setLocalVariable(LOADED_TAG_KEY, this, null);
  tag.release();
  getTagPool().returnTag(tag);
}

相关文章