
|
If you were logged in you would be able to see more operations.
|
|
|
|
If a custom TagErrorRenderer is used InputTagSupport.doEndTag() won't reset its state properly when the TagErrorRenderer's doAfterEndTag() method throws an exception. If the servlet container pools tags (like Tomcat) this could cause unexpected behaviour.
I think the following code in InputTagSupport:
public final int doEndTag() throws JspException {
int result = doEndInputTag();
if (getFieldErrors() != null) {
this.errorRenderer.doAfterEndTag();
}
if (this.focus) {
makeFocused();
}
this.errorRenderer = null;
this.fieldErrors = null;
this.fieldErrorsLoaded = false;
this.focus = false;
return result;
}
should be changed into something like
public final int doEndTag() throws JspException {
try {
int result = doEndInputTag();
if (getFieldErrors() != null) {
this.errorRenderer.doAfterEndTag();
}
if (this.focus) {
makeFocused();
}
} finally {
this.errorRenderer = null;
this.fieldErrors = null;
this.fieldErrorsLoaded = false;
this.focus = false;
}
return result;
}
|
|
Description
|
If a custom TagErrorRenderer is used InputTagSupport.doEndTag() won't reset its state properly when the TagErrorRenderer's doAfterEndTag() method throws an exception. If the servlet container pools tags (like Tomcat) this could cause unexpected behaviour.
I think the following code in InputTagSupport:
public final int doEndTag() throws JspException {
int result = doEndInputTag();
if (getFieldErrors() != null) {
this.errorRenderer.doAfterEndTag();
}
if (this.focus) {
makeFocused();
}
this.errorRenderer = null;
this.fieldErrors = null;
this.fieldErrorsLoaded = false;
this.focus = false;
return result;
}
should be changed into something like
public final int doEndTag() throws JspException {
try {
int result = doEndInputTag();
if (getFieldErrors() != null) {
this.errorRenderer.doAfterEndTag();
}
if (this.focus) {
makeFocused();
}
} finally {
this.errorRenderer = null;
this.fieldErrors = null;
this.fieldErrorsLoaded = false;
this.focus = false;
}
return result;
}
|
Show » |
|
|