Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1271 | major | always | 07-28-06 12:55 | 08-21-06 15:55 | |
|
|||||
Reporter: | planetpratt | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.19 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.0.21 | ||
|
|||||
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. |
||||
Steps To Reproduce: | |||||
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. |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|