I think I solved my problem and I post my solution might be useful in future to another newbie (like me

)
I'm also interested to learn other ways to reach my scope.
I put this filter declaration in web.xml
I also write this class:
In this way when i go to logout I make some
string operations (that edit protocol and port) and perform a redirect to the home page.
Regards
SM