10 Replies Latest reply on Aug 24, 2011 3:40 AM by mismail

    How build a customized login page?

    fernando2010

      Hi

       

      For login to any portal, appear a SignIn portlet, where you can see the GateIn logo and the "welcome to Gatein" label.
      but I want my own login page, which are the steps for do it?

      GateIn has an api for it? ei, add new users with a profile.

       

      regards

        • 1. Re: How build a customized login page?
          ndkhoiits

          FYI, you can build a login page everywhere, you must only using authenticate(username, password) method in UserHandler interface for authenticate

          • 2. Re: How build a customized login page?
            trong.tran

            BTW, I'm not sure if this {portal.war}/login/jsp/login.jsp file is what you are looking for.

            • 3. Re: How build a customized login page?
              fernando2010

              yeah, the Khoi's answer I think a good option, but excuse me, where is this interface: "UserHandler ", I don't find it.

              I have "GateIn-3.1.0-FINAL-jbossas.zip" installed.

              thanks

              • 4. Re: How build a customized login page?
                hoang_to

                In portal.war/web.xml, you have the element <log-config>

                 

                <login-config>
                      <auth-method>FORM</auth-method>
                      <realm-name>gatein-domain</realm-name>
                        <form-login-config>
                          <form-login-page>/initiatelogin</form-login-page>
                            <form-error-page>/errorlogin</form-error-page>
                      </form-login-config>
                    </login-config>

                 

                And the servlet mapping

                 

                <servlet-mapping>
                      <servlet-name>InitiateLoginServlet</servlet-name>
                      <url-pattern>/initiatelogin</url-pattern>
                    </servlet-mapping>

                 

                 

                  For authentication, Tomcat would redirect user to InitiateLoginServlet. This servlet, in its turn would redirect to the page  login.jsp (in private mode) or the login form in public mode.

                 

                The login.jsp serves as infrastructure to build custom login page

                • 5. Re: How build a customized login page?
                  ndkhoiits

                  ok, MinhHoang replied a good information for you. You can customize your servlet for your login form. By default, gatein will redirect to {portal.war}/login/jsp/login.jsp whenever user wants to login or login error

                  • 6. Re: How build a customized login page?
                    mismail

                    I'm facing similar problem. I'm changing in gatein.ear/02portal.war/login/jsp/login.jsp but its not reflecting the changes on Login Page. I can't change the welcome message, can't customize it etc. Can anybody help what could be the problem?

                    • 7. Re: How build a customized login page?
                      mvanco

                      Hi,

                      there are few places related to login page which you can edit:

                       

                      login dialog (panel displayed when click on Sign in button):

                      gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl

                       

                      login page (page displayed when unsuccessful login or on session expiration):

                      gatein.ear/02portal.war/login/jsp/login.jsp

                       

                      home page portlet:

                      gatein.ear/02portal.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl

                       

                      CSS styles can be found at related skin directories.

                       

                      Hope this helps,

                      Michal Vančo, Portal QA

                      • 8. Re: How build a customized login page?
                        mismail

                        I've tried all these places, but I'm unable to change all of above.

                         

                        Ismail

                        • 9. Re: How build a customized login page?
                          mvanco

                          Ismail, can you try start the portal with -Dexo.product.developing=true parameter? (You can also add it at run.conf file)

                           

                          I've tried it a while ago and I saw changes on all above places.

                          • 10. Re: How build a customized login page?
                            mismail

                            I've tried starting with this parameter but still no success. I've taken the fresh copy of Gatein 3.1 server and tried the parameter and removed all the content from UILoginForm.gtmpl and login.jsp, but still can't see any change. Same with UIHomePagePortlet.gtmpl.

                             

                            I've expanded sample-ext.war and done changes in sample-ext.war/login/jsp/login.jsp sample-ext.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl and it worked out!

                             

                            Thanks,

                            Ismail