+ Start a Discussion
DivyaReddyDivyaReddy 

very urgent issue on customer portal

HI

 

I am new to Customer portal .

my requirement is to login into website which i have used Visualforce page so i am using default logincontroller but problem is it is redirecting again login page.

 

But i want to redirect to other visualforce page.

 

can any one help on this issue.

 

here i am posting my Controller:

 

global with sharing class SiteLoginController {
    global String username {get; set;}
    global String password {get; set;}

    global PageReference login() {
        String startUrl = System.currentPageReference().getParameters().get('startURL');
                return Site.login(username, password, startUrl );
        }

Ispita_NavatarIspita_Navatar

Hi DivyaReddy,

It seems the issue is in your source code which is generating the startURL. Please note that you need to check for null value in the variable "StartUrl" using an if-else construct. In case its value is null you can assign "StartUrl" a particular value  say "/home/home.jsp" else do nothing.

Please refer to the following code snippet for clarity:-

 Code: 

                                if(startUrl == '' || startUrl == null)

                                {

                               startUrl = '/home/home.jsp';

                                }

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.