|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.ora.jsp.tags.DebugTag
This class is a custom action that can be used to extract debug information from a JSP PageContext. The debug info is sent to the browser, System.out, and the application log file, depending on the value of the "debug" request parameter sent with the request for the JSP page: "resp", "stdout" and "log". The values can be combined to get the information directed to multiple targets.
Field Summary | |
private static java.lang.String |
BEAN_ATTR
|
private static java.lang.String |
LINE_FEED
|
private static java.lang.String |
LOG_TYPE
|
private static java.lang.String |
RESP_TYPE
|
private static java.lang.String |
STDOUT_TYPE
|
private java.lang.String |
type
|
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
DebugTag()
|
Method Summary | |
int |
doEndTag()
Writes the requested type of debug info to the sources specified by the "debug" request parameter: "resp" for response, "stdout" for System.out, and "log" for the application log file. |
private java.util.List |
getDebugType()
Returns a List with all debug types based on the debug request parameter. |
private java.util.Map |
getInfo(java.lang.String type,
DebugBean bean)
Returns the debug info corresponding to the type. |
private void |
log(java.lang.String propName,
java.util.Map values,
java.util.List debugTypes)
|
private void |
log(java.lang.String propName,
java.lang.String msg,
java.util.List debugTypes)
Writes the specified property value to the System.out or the log file, depending on the requested debug type. |
void |
setType(java.lang.String type)
Set the type property. |
private java.lang.String |
toHTMLTable(java.lang.String propName,
java.util.Map values)
Returns an HTML table with all the values of the specified property. |
private java.lang.String |
toTabbedTable(java.util.Map values)
Returns an simple ASCII table with all the values of the specified property, used for log output. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String LINE_FEED
private static final java.lang.String RESP_TYPE
private static final java.lang.String STDOUT_TYPE
private static final java.lang.String LOG_TYPE
private static final java.lang.String BEAN_ATTR
private java.lang.String type
Constructor Detail |
public DebugTag()
Method Detail |
public void setType(java.lang.String type)
public int doEndTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
private java.util.List getDebugType()
private java.util.Map getInfo(java.lang.String type, DebugBean bean) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
private void log(java.lang.String propName, java.lang.String msg, java.util.List debugTypes)
private void log(java.lang.String propName, java.util.Map values, java.util.List debugTypes)
private java.lang.String toHTMLTable(java.lang.String propName, java.util.Map values)
private java.lang.String toTabbedTable(java.util.Map values)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |