Specifying a home page when building screens with the web UI framework

When building screens with the web UI framework you can specify a home page.

About this task

During login, the authentication provider fetches the home page to be displayed in the following manner:

Procedure

  1. It first looks for the home page entry in the forward URL, which is fetched from the request parameter's scui-login-page-referrer attribute.

    If the user is logging in for the first time, this attribute is set to null and the authentication provider looks for the custom Home Page Provider class entry. If the user is logging again after browsing, the authentication provider will first look for the home page to be displayed in the referral URL.

    After logging in, the user has browsed through some pages 7and then for checkout he is again asked to re-enter the login information. Now, when the same user again tries to log in, the authentication provider will first look for the page to be displayed in the referral URL.
  2. If the forwarded URL is not defined, it looks for the custom Home Page Provider class context param (scui-loginhomepage-provider) in the web.xml file.

    If you have custom logic for displaying the home page that is based on one or more validations, then add this custom logic and any validations to your Home Page Provider class. This class should implement the ISCUIHomePageProvider interface. You will return the URI for home page in the getHomePagePath(SCUIContext ctx) method.

    Using this custom home page provider, you can specify multiple home pages.

    You should add the context param entry for your custom Home Page Provider class in the web.xml file as shown below:

    <context-param>
          <param-name>scui-loginhomepage-provider</param-name>
          <param-value>com.sc.cp.MyHomePageProvider</param-value>
    </context-param>
  3. If the Home Page Provider class entry is not defined, it looks for the Default Home Page context param (scui-loginhomepage-default) in the web.xml file.

    If you do not have any custom logic or validations for displaying the home page, you can provide a default home page to go to when the user is logged in. Add a context param entry for the default home page in the web.xml file. The Web_Context_Root variable is the context root of your web application.

    <context-param>
          <param-name>scui-loginhomepage-default</param-name>
          <param-value>/Web_Context_Root/home.do</param-value>
    </context-param>
  4. If the Default Home Page entry is not defined, it goes to the home.detail page.