Fixed bug where <hs:cause> would always return the default value. Closes #2.
This commit is contained in:
parent
3172b2b39f
commit
cb581bf0d9
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ import java.io.IOException;
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public class ReasonTag extends XmlSupport {
|
public class ReasonTag extends XmlSupport {
|
||||||
private int statusCode;
|
private int statusCode = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
@ -59,7 +59,7 @@ public class ReasonTag extends XmlSupport {
|
||||||
final JspWriter out = pageContext.getOut();
|
final JspWriter out = pageContext.getOut();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (statusCode >= 0) {
|
if (statusCode > -1) {
|
||||||
Utils.outWrite(out, Reasons.getReasonPhrase(statusCode), defaultValue, escapeXml);
|
Utils.outWrite(out, Reasons.getReasonPhrase(statusCode), defaultValue, escapeXml);
|
||||||
} else {
|
} else {
|
||||||
Utils.outWrite(out, Reasons.getReasonPhrase(pageContext.getErrorData().getStatusCode()), defaultValue,
|
Utils.outWrite(out, Reasons.getReasonPhrase(pageContext.getErrorData().getStatusCode()), defaultValue,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue