Class JspUtils
- java.lang.Object
-
- org.apache.velocity.tools.view.jsp.jspimpl.JspUtils
-
public class JspUtils extends java.lang.ObjectSome utilities to work with JSP.
-
-
Constructor Summary
Constructors Constructor Description JspUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexecuteSimpleTag(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node, javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.SimpleTag tag)Executes aSimpleTag.static voidexecuteTag(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node, javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag tag)Executes aTag.static javax.servlet.jsp.tagext.JspTaggetLatestJspTag(org.apache.velocity.context.Context context)Returns the latest tag encountered.static voidsetLatestTag(org.apache.velocity.context.Context context, javax.servlet.jsp.tagext.JspTag tag)Sets the latest tag encountered.static javax.servlet.jsp.tagext.TagwrapTag(javax.servlet.jsp.tagext.JspTag tag)If necessary, wraps aSimpleTaginto aTag.
-
-
-
Method Detail
-
setLatestTag
public static void setLatestTag(org.apache.velocity.context.Context context, javax.servlet.jsp.tagext.JspTag tag)Sets the latest tag encountered.- Parameters:
context- The Velocity context.tag- The tag.
-
getLatestJspTag
public static javax.servlet.jsp.tagext.JspTag getLatestJspTag(org.apache.velocity.context.Context context)
Returns the latest tag encountered.- Parameters:
context- The Velocity context.- Returns:
- The latest tag.
-
wrapTag
public static javax.servlet.jsp.tagext.Tag wrapTag(javax.servlet.jsp.tagext.JspTag tag)
If necessary, wraps aSimpleTaginto aTag.- Parameters:
tag- The tag to (possibly) wrap.- Returns:
- The wrapped tag, or the tag passed as parameter if it was not necessary.
-
executeSimpleTag
public static void executeSimpleTag(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node, javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.SimpleTag tag) throws javax.servlet.jsp.JspException, java.io.IOExceptionExecutes aSimpleTag.- Parameters:
context- The directive context.node- The main node of the directive.pageContext- The page context.tag- The tag to execute.- Throws:
javax.servlet.jsp.JspException- If something goes wrong.java.io.IOException- If something goes wrong.
-
executeTag
public static void executeTag(org.apache.velocity.context.InternalContextAdapter context, org.apache.velocity.runtime.parser.node.Node node, javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag tag) throws javax.servlet.jsp.JspExceptionExecutes aTag.- Parameters:
context- The directive context.node- The main node of the directive.pageContext- The page context.tag- The tag to execute.- Throws:
javax.servlet.jsp.JspException- If something goes wrong.
-
-