[ http://mc4j.org/jira/browse/STS-333?page=comments#action_10589 ] 
            
Niklas Therning commented on STS-333:
-------------------------------------

I've had problems with this in Tomcat. I had some validation errors on my page 
so my TagErrorRenderer was invoked which threw an exception. After that, 
whenever I browsed to that same page I would get the same exception even though 
no form had been posted and no validation should occur.

> Insufficent cleanup in InputTagSupport.doEndTag() on exceptions from 
> TagErrorRenderer
> -------------------------------------------------------------------------------------
>
>                 Key: STS-333
>                 URL: http://mc4j.org/jira/browse/STS-333
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.4.2
>            Reporter: Niklas Therning
>         Assigned To: Tim Fennell
>            Priority: Minor
>
> 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;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to