Anonymous | Login | Signup for a new account | 12-17-2024 10:41 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001271 | [Resin] | major | always | 07-28-06 12:55 | 08-21-06 15:55 | ||||
Reporter | planetpratt | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.19 | ||||||
Summary | 0001271: PageContext.removeAttribute(name,PageContext.PAGE_SCOPE) removes from ALL scopes | ||||||||
Description |
The implementation of com.caucho.jsp.PageContextImpl.removeAttribute(String,int) contains the following code: switch (scope) { case PAGE_SCOPE: removeAttribute(name); break; Which improperly calls the PageContext.removeAttribute(String) method. removeAttribute(String) is specifically defined in the JSP 2.0 spec to "Remove the object reference associated with the given name from all scopes." Whereas removeAttribute(String,int) is defined to "Remove the object reference associated with the specified name in the given scope". Since removeAttribute(String,int) calls removeAttribute(String) when it is passed PageContext.PAGE_SCOPE it removes the attribute from ALL scopes, not just the intended scope. |
||||||||
Additional Information |
I believe by replacing the call to removeAttribute(name); on line 412 of PageContextImpl.java with: if(name == null) throw new NullPointerException(L.l("removeAttribute must have a non-null name")); _attributes.remove(name); resin should once again be JSP 2.0 compliant. N.B. The Exception message for removeAttribute(String) on line 318 incorrectly identifies itself as getAttribute. |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed. 26 unique queries executed. |