+ Start a Discussion
Sathiskumar ShanmugamSathiskumar Shanmugam 

Session Maintenance between VF pages

Hi all,




I am developing Force.com public site in Developer Edition.


I have a query on maintaining session between VF pages.


I have created one custom object to store username and password.


Created two VF pages called Login and Welcome and enabled for Force.com site.


Once the user enters login credentials on login VF page, the controller will authenticate the user and it will redirect to Welcome VF page. After logged out if I click on back button it goes to the welcome VF page without authentication details.


So, my query is how to maintain session between VF pages.


For Eg. here I should maintain session between Login and Welcome VF pages.


Let me know, is there anyway to maintain session in VF pages.


Thanks in advance.


Are you trying to use custom authenitcation instead of salesforce portal license? If yes then you should use portal license. As per the sites policy you should not try to manage your own username and password without license.




Sathiskumar ShanmugamSathiskumar Shanmugam



Thanks for the valuable reply.




you can use Global Variable - User i.e.

    <apex:outputText value="Hi {!$User.FirstName} {!$User.LastName}! Welcome to our Organization!" />

 please mark it as SOLVED  if you got the answer.