| Author |
Can i call filter after particulate event?
|
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 233
|
|
Hi can i call a filter after a event, say i have a logout link and it is redirecting to lo-gout servlet where i am removing all session attributes like this
is that possible or any why to clear cache after logout link is pressed..
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
|
You don't call filters -- they are automatically invoked to bracket mapped requests. Why do you need to call a filter? Just refactor the code so that it can be called as a method.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 233
|
|
|
i want to clear all jsp cache after logout. if i use methode is it clear all my JSP cache?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
It appears to me that your question is actually "How do I clear my JSP cache (whatever that is) from Java code in a servlet or filter?" Is that right?
|
 |
mallikarjun dontamsetti
Ranch Hand
Joined: Mar 18, 2011
Posts: 233
|
|
|
yes correct
|
 |
Kumaravadivel Subramani
Ranch Hand
Joined: Jul 05, 2008
Posts: 162
|
|
|
You could have the same logic within a method to clear your JSP, servlets cache when you wanted to do so. Actually by calling appropriate session.invalidate(), will clear all session stored items for a particular session.
|
No pain, No gain.
OCJP 1.6
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
The session has nothing at all to do with the cache, so invalidating the session will have no effect not he cache.
See the ServletsFaq for information on setting cache headers.
|
 |
Kumar Raja
Ranch Hand
Joined: Mar 18, 2010
Posts: 457
|
|
say i have a logout link and it is redirecting to lo-gout servlet
You can configure filters to intercept request/responses before reaching/coming from the servlet. So, upon clicking "logout" it is expected to go to servlet and you can configure a filter before it goes to the actual servlet.
But this has nothing to do with clearing cache. As Bear pointed out, you need to refer the link he provided.
|
Regards
KumarRaja
|
 |
 |
|
|
subject: Can i call filter after particulate event?
|
|
|