You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/11/20 17:01:02 UTC

BugRat Report #412 has been filed.

Bug report #412 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com/BugRatViewer/ShowReport/412>

REPORT #412 Details.

Project: Jasper
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: non-critical
Confidence: public
Environment: 
   Release: 3.1
   JVM Release: 1.3
   Operating System: Win NT
   OS Release: 4.0
   Platform: huh?

Synopsis: 
public void removeAttribute(String name) does not work properly

Description:
lt. spec from sun this method is required to remove
the attribute from every scope.  in class PageContextImpl
however this only removes attributes from the page context:

public void removeAttribute(String name) {
  attributes.remove(name);
}

btw: sun did not make clear, whether the attribute will
only be removed from the first scope where it is  found
or from all scopes...  (i indicated this to
mailto:jsr-053-comments@sun.com)

Re: PageContext.removeAttribute

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Pierre Delisle wrote:
> 
> > Bug report #412 has just been filed.
> 
> > Synopsis:
> > public void removeAttribute(String name) does not work properly
> >
> > Description:
> > lt. spec from sun this method is required to remove
> > the attribute from every scope.  in class PageContextImpl
> > however this only removes attributes from the page context:
> >
> > public void removeAttribute(String name) {
> >   attributes.remove(name);
> > }
> >
> 
> This is indeed a bug, and I can go ahead and fix it
> (at least in 3.3/4.0).
> However, before I do so, would someone know why we
> have the following comments/code in PageContextImpl?
> 
> In the class comments:
>  * The removeAttribute method does not work for request scope. Needs fixing.
> 
> public void removeAttribute(String name, int scope) {
>     switch (scope) {
>     ...
>     case REQUEST_SCOPE:
>         throw new IllegalArgumentException("cant remove Attributes from request scope");
>     ...

Most likely these are pre-Servlet 2.2 comments. Prior to Servlet 2.2 there
was no way to remove a request attribute.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

PageContext.removeAttribute

Posted by Pierre Delisle <pi...@sun.com>.
> Bug report #412 has just been filed.

> Synopsis:
> public void removeAttribute(String name) does not work properly
> 
> Description:
> lt. spec from sun this method is required to remove
> the attribute from every scope.  in class PageContextImpl
> however this only removes attributes from the page context:
> 
> public void removeAttribute(String name) {
>   attributes.remove(name);
> }
> 

This is indeed a bug, and I can go ahead and fix it
(at least in 3.3/4.0).
However, before I do so, would someone know why we
have the following comments/code in PageContextImpl?

In the class comments:
 * The removeAttribute method does not work for request scope. Needs fixing.


public void removeAttribute(String name, int scope) {
    switch (scope) {
    ...
    case REQUEST_SCOPE:
        throw new IllegalArgumentException("cant remove Attributes from request scope");
    ...


  -- Pierre