Samanthi perera wrote:can you give me exmple for cokkies how to set cokkies to this ?
Search the web--there are hundreds of examples.
why do you think that is handle in filter?
Because you need to check for login on a specific set of pages, and filters are good at that.
when you are talking about filter i feel it shuold better handle in listner?is it?
Depends on what specific aspect of the problem you're talking about. But no, I wouldn't use a listener for any of this, because the checking for logged in status and logging in are triggered by hitting a URL (handled by filters) and hitting the login URL (handled by servlets).