tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49505] New: ApplicationHttpRequest.setAttribute doesn't call the wrapper's setAttribute in case of "special" attributes
Date Fri, 25 Jun 2010 16:43:23 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49505

           Summary: ApplicationHttpRequest.setAttribute doesn't call the
                    wrapper's setAttribute in case of "special" attributes
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: ranjix@hotmail.com


Hey guys, sorry for the bother. I ran into an issue with a fairly complicated
case, in which I have a filter for jsp's, and I use a request wrapper in the
respective filter. My request wrapper overrides setAttribute and getAttribute
(does some internal management, not relying on the "super"), and I had the
surprise to see that the setAttribute from my wrapper doesn't get called from
the org.apache.catalina.core.ApplicationHttpRequest setAttribute, at least not
for the "special attributes" (and I need the javax.servlet.include attributes,
which Tomcat considers "special"). 

The code that I find is problematic is copied underneath (the if(!setSpecial)
part), and the question is "why doesn't the getRequest.setAttribute get called
ALL THE TIME". The problem manifests when I do a jsp:include, and when the
filter on the included jsp checks my wrapper, can't find the
javax.servlet.include.* attributes. This is somewhat bothering, considering
that I don't have this issue with Weblogic and Websphere, both do call my
wrapper's set/getAttribute... 

thanks for any suggestion/
ranjix 


p.s.


public  void setAttribute(String name,
    Object value) 
{
        if (name.equals(Globals.DISPATCHER_TYPE_ATTR)) {
            dispatcherType = value;
            return;
        } else if (name.equals(Globals.DISPATCHER_REQUEST_PATH_ATTR)) {
            requestDispatcherPath = value;
            return;
        }
        if (!setSpecial(name, value)) {
            getRequest().setAttribute(name, value);
        }
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message