I use JSF 1.2 and richfaces 3.3 in my application. I have 2 different login pages. Suppose the user logs in through one of the login page and if the session expires, i have handled it through viewExpiredException in web.xml. I display a page where the user will be notified that the session is expired and is asked to click on a link to go to login page. When the user clicks on the link, i need to redirect the user to the same login page where he logged in. Please suggest me how can i know that the user has logged in from which login page.?