Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003059 [Resin] minor always 11-09-08 00:56 08-13-09 16:23
Reporter masum View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.2 Product Version 3.2.1
  Product Build
Summary 0003059: javax.servlet.foward.* request attributes not set if the request is wrapped
Description If a servlet filter wraps a request with a subclass of HttpServletRequestWrapper, when the request is forwarded (say to a JSP), the javax.servlet.foward.* attributes are not set in the request. These attributes are supposed to be set in a forwarded request according to the 2.4 servlet specs. The issue is present in both 3.2.x and 3.1.x branches.
Steps To Reproduce
Additional Information The issue is probably in the RequestDispatcherImpl.forward(request, response, method, invocation) method. I tried to understand the code flow, but it is difficult without understanding the design scenario. The code sets the attributes in the sub request, but then passes on the top request to the invocation.
Attached Files

- Relationships

- Notes
(0003832)
rymsha
02-21-09 12:31

We have the same issue when using Spring Security (which uses HttpServletRequestWrapper) and JstlView
which extends InternalResourceView (to render jsps)

Here is BTW a javadoc from InternalResourceView setExposeForwardAttributes method

/**
* Set whether to explictly expose the Servlet 2.4 forward request attributes
* when forwarding to the underlying view resource.
*

Default is "true" on Servlet containers up until 2.4, and "false" for
* Servlet 2.5 and above. Note that Servlet containers at 2.4 level and above
* should expose those attributes automatically! This InternalResourceView
* feature exists for Servlet 2.3 containers and misbehaving 2.4 containers.
*/
 

The only one workaround I found:
use <property name="alwaysInclude" value="true"/>
for InternalResourceViewResolver

 
(0004121)
ferg
08-13-09 16:23

server/10y9
 

- Issue History
Date Modified Username Field Change
11-09-08 00:56 masum New Issue
11-09-08 02:40 masum Issue Monitored: masum
02-21-09 12:31 rymsha Note Added: 0003832
02-21-09 12:33 rymsha Issue Monitored: rymsha
08-13-09 16:23 ferg Note Added: 0004121
08-13-09 16:23 ferg Assigned To  => ferg
08-13-09 16:23 ferg Status new => closed
08-13-09 16:23 ferg Resolution open => fixed
08-13-09 16:23 ferg Fixed in Version  => 4.0.2


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker