/** * Delegates to wrapped tag. */ public void doTag() throws JspException, IOException { tag.doTag(); }
public int doStartTag() throws JspException { try { _simpleTag.doTag(); } catch (IOException e) { Log log = LogFactory.getLog(SimpleTagWrapper.class); log.warn(e.getMessage(), e); } return Tag.SKIP_BODY; }
/** * Execute the {@link SimpleTag} safely converting any exception into a * {@link RuntimeException}. Does nothing if the instance provided is * <code>null</code>. * * @param tag * the {@link SimpleTag} to execute * * @throws RuntimeException * if one of {@link JspException} or {@link IOException} is * thrown when executing the {@link SimpleTag#doTag()} method */ public static void doTag(SimpleTag tag) { if(tag == null) { return; } try { tag.doTag(); } catch (JspException | IOException e) { throw new RuntimeException(e); } }
/** * Implementation of {@link NestedTag#doLifecycle} for simple * tags. Returns <code>-1</code> in this case, because * <code>doTag()</code> does not have a return value. */ public int doLifecycle() throws JspException { try { populateAttributes(); tag.doTag(); } catch(IOException exc) { throw new NestedApplicationException(exc); } return -1; }
/** * Executes a {@link SimpleTag}. * * @param context The directive context. * @param node The main node of the directive. * @param pageContext The page context. * @param tag The tag to execute. * @throws JspException If something goes wrong. * @throws IOException If something goes wrong. */ public static void executeSimpleTag(InternalContextAdapter context, Node node, PageContext pageContext, SimpleTag tag) throws JspException, IOException { tag.setJspBody(new VelocityJspFragment(pageContext, (ASTBlock) node .jjtGetChild(1), context)); tag.doTag(); }