JSF Back button problem

720 views
Skip to first unread message

Sumeet

unread,
Mar 18, 2009, 11:08:01 AM3/18/09
to Bangalore Open Java Users Group- BOJUG
In JSF the browser cache is not cleared. I tried the PhaseListener to
clear the cache so that the refreshed page will display but this also
not solve my problem.

in my application when the user logout from the application and press
the back button then he again enter in his account without asking
username and password. I check my session handling. session handling
is working well. when i click on logout button, i invalidate the
session but when the user clicks on back button the session will
recreate with all the previous session attributes automatically and
let the user login without asking username and password.

Thanks in advance

aayush

unread,
Mar 18, 2009, 11:29:06 AM3/18/09
to Bangalore Open Java Users Group- BOJUG
I am facing the same problem..
Is there no way to disable the back button, or clear the cache from my
application??

aayush

Raghavan.30May1981_GMail

unread,
Mar 18, 2009, 11:48:37 AM3/18/09
to bo...@googlegroups.com
Are you appending the jsession id to the URL ?

Cheers,
Raghavan alias Saravanan M.
http://groups.google.com/group/S_H_a_D_E

"Every relation has a secret question about what one should pay for it. Some are lucky as the question doesn't last longer at all"

Sumeet

unread,
Mar 19, 2009, 12:57:22 AM3/19/09
to Bangalore Open Java Users Group- BOJUG
hi,
jsessionid is appended automatically if the client's browser is not
accepting cookies(cookies are disabled on client side). is their any
STATE maintenance issue regarding JSF ?

On Mar 18, 8:48 pm, "Raghavan.30May1981_GMail" <raghavan.
30may1...@gmail.com> wrote:
> Are you appending the jsession id to the URL ?
>
> Cheers,
> Raghavan alias Saravanan M.http://groups.google.com/group/S_H_a_D_E
>
> "Every relation has a secret question about what one should pay for it. Some
> are lucky as the question doesn't last longer at all"
>

Sumeet

unread,
Mar 19, 2009, 5:53:15 AM3/19/09
to Bangalore Open Java Users Group- BOJUG
hi,

The Bug has been solved. try <redirect/> in faces-config

<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/jsp/registeredHomePage.jsp</to-view-id>
<redirect/>
</navigation-case>

Raghavan.30May1981_GMail

unread,
Mar 19, 2009, 7:25:51 AM3/19/09
to bo...@googlegroups.com
Oh. thats great! Thanks for posting the solution back.

Generally jsessionId gets appended to the url (using encodeURL() of response) if the client does NOT accept cookies and its the suggested way to get rid off the back button problems -- as what I have experienced and heard.


Cheers,
Raghavan alias Saravanan M.
http://groups.google.com/group/S_H_a_D_E

"Every relation has a secret question about what one should pay for it. Some are lucky as the question doesn't last longer at all"


Reply all
Reply to author
Forward
0 new messages