Class TagUtil
java.lang.Object
org.apache.sling.scripting.jsp.util.TagUtil
The
TagUtil class provides a series of utility methods which
may be used by tag library implementations to access Component API specific
objects and do other processing.-
Method Summary
Modifier and TypeMethodDescriptionstatic SlingHttpServletRequestgetRequest(javax.servlet.jsp.PageContext pageContext) static SlingHttpServletResponsegetResponse(javax.servlet.jsp.PageContext pageContext) static ThrowablegetRootCause(javax.servlet.ServletException e) Unwrap a component exception to get the true root cause of an exceptionstatic voidLog an INFO message to the given logger with context information from thepageContext.
-
Method Details
-
log
public static void log(org.slf4j.Logger log, javax.servlet.jsp.PageContext pageContext, String message, Throwable t) Log an INFO message to the given logger with context information from thepageContext.- Parameters:
log- The SLF4JLoggerto use for writing the message.pageContext- The JSP page context providing contextual information for the log message.message- The message to log. If this isnull, the message of the exception is taken, unless the expression is alosnull, in which case this method just logs nothing.t- The exception to be logged alongside the message. This may benull. If this is aServletExceptionit is unwrapped by thegetRootCause(ServletException)method before being used.
-
getRootCause
Unwrap a component exception to get the true root cause of an exception -
getRequest
-
getResponse
-