Filters and Wrappers

Riadh Haouari

Greenhorn

Posts: 3

posted 9 years ago

Hi All, I'm using the SCWCD Study Guide from Osborne edition to prepare the exam, and in the chapter dealing with filters and wrappers there is an unclear point. it's mentionned that you cannot work directly with the request object that is passed as a parameter to the filter and it must be wrappered in a ServletRequestWrapper or HttpServletRequestWrapper object. But i tried some tests on filters , i added some attributes in the request scope in the doFilter method and i get them in the filtered servlet. Does any one has an idea what is meant by mentionning that the request can't be used directly?