myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himanshu.Shek...@perficient.com
Subject Http Get Problem: doFilter() method not getting called
Date Wed, 16 Nov 2005 16:11:12 GMT
<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><FONT face="Default
Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><DIV>Hello Everyone, </DIV><DIV>
</DIV><DIV> </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; I'm
trying to implement HTTP Get (basically passing a URL with parameter from the browser) using
myfaces. The sample code I used is from <A href="http://64.233.161.104/search?q=cache:mX3JoAcU1kUJ:jroller.com/page/why%3Fentry%3Dhow_to_do_a_jsf+get+URL+FacesContext&amp;hl=en"
target=blank>http://64.233.161.104/search?q=cache:mX3JoAcU1kUJ:jroller.com/page/why%3Fentry%3Dhow_to_do_a_jsf+get+URL+FacesContext&amp;hl=en
</A>&nbsp;URL. This basically implements a ServletFilter and parses the URL, creates
a backing bean, updates the properties in the bean and puts the backing bean in a session
scope, and use this session scoped bean in subsequent pages. </DIV><DIV> </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;
This works fine except for one caveat.&nbsp;Once I've logged out of the application, I
invalidate the session. At this point of time, there is no session information&nbsp;on
the server side, but the browser still has the information about the HTTP GET request (the
browser has cached this information, or at least this is what appears to me). If I use the
same browser and the same exact URL that was previously used, the doFilter() method of the
ServletFilter doesn't get called. So the backing bean doesn't get created and eventually when
trying to access the backing bean in subsequent pages, it throws a NullPointerException. If
I use the same browser, and change the values in the URL than previously used, doFilter()
method of ServletFilter gets called and everything works fine. If I use a new instance of
the browser, with the same URL that was used previously, it also works. The only time it doesn't
work is when the session on the server side is invalidated at user logout, and the previous
URL is used in the same browser, the problem happens. </DIV><DIV> </DIV><DIV>&nbsp;&nbsp;&nbsp;
Questions: 1. Is there any&nbsp;way to fix this?&nbsp; </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.
Is there an alternative way to implement HTTP GET in myfaces (JSF). </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3. Is there a way to remove the cache from the browser programatically. </DIV><DIV>
</DIV><DIV>I really need your help in this regard. I'm kind of stuck on this.
</DIV><DIV> </DIV><DIV>Thanks and regards, </DIV><DIV>Himanshu
</DIV></FONT></FONT>
Mime
View raw message