Retreive HttpSession in Filter

Hi,

For an access contol filter, i want to set a session attribute in the dofilter method of the filter.

To acces the session, i cast the servletRequest to httpServletRequest, and pass it to the filter chain.

But when i get the attribute from the request object of the taget, the attribute is always null.

Is the cast Wrong ?

How can i reteive the sesion and set attribute session in a filter ?

Thanks ...

[448 byte] By [chablota] at [2007-9-27 6:51:12]
# 1
Hi...try to build a java component in a extensible httpServletRequest but not hit the property serializable.. make a new metod and incorpore this for your proyect... that works correctly and your code runs. the cast is ok. to receive attribute session make a session bean. bye!
Hentryxa at 2007-7-8 9:42:21 > top of Java-index,Other Topics,Patterns & OO Design...