Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incorrect URL in browser using JSF 2.0

Tags:

jsf

jsf-2

I'm creating login form using JSF 2.0. Below is the detailed description.

When I run the form, I get the login.xhtml

Once I get successfully logged in, I get page as temp1.xhtml and when I click the link (that I have created on temp1.xhtml page) I get temp2.xhtml page.

All is working perfectly... but the problem of URL which is described below...

When I successfully logged in, the browser still shows URL as login.xhtml instead if temp1.xhtml

when I click on the link that is on temp1.xhtml, I get temp2.xhtml page but the URL says temp1.xhtml instead of temp2.xhtml

Could any one help me to show the correct URL as I have to filter these pages and as URL is INCORRECT my filter is useless...

Please note that I am not using configuration file for directing the pages...

like image 949
Fahim Parkar Avatar asked Mar 20 '26 03:03

Fahim Parkar


1 Answers

You have to add:

?faces-redirect=true in the end of the view that you are directing.

e.g:

return "mypage?faces-redirect=true"
like image 182
Dejell Avatar answered Mar 22 '26 20:03

Dejell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!