AnsweredAssumed Answered

Customize the login page

Question asked by lil on Jul 16, 2008
Hi,

I need some  help to customize the login page. To do this properly, I don't want to edit tomcat/webapps/alfresco/jsp/login.jsp.

So I followed the steps described here : http://wiki.alfresco.com/wiki/Customising_The_Login_Page#Custom_Login_Page

I created the folder tomcat/webapps/alfresco/jsp/extension
I copied the default login.jsp to the new folder
I added this to web-client-config-custom.xml :
<config>
   <client>
      <login-page>/jsp/extension/login.jsp</login-page>
   </client>
</config>

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                             "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
  <navigation-rule>
     <from-view-id>/jsp/*</from-view-id>
     <navigation-case>
        <from-outcome>logout</from-outcome>
        <to-view-id>/jsp/extension/ISFBlogin.jsp</to-view-id>
     </navigation-case>
  </navigation-rule>
 
I created tomcat/shared/classes/alfresco/extension/faces-config-custom.xml and added :
  <navigation-rule>
     <from-view-id>/jsp/extension/ISFBlogin.jsp</from-view-id>
     <navigation-case>
        <from-outcome>success</from-outcome>
        <to-view-id>/jsp/browse/browse.jsp</to-view-id>
     </navigation-case>
  </navigation-rule>
</faces-config>

I cleared my browser cache and the tomcat cache ("work" folder).

I deleted (renamed actually) the default login.jsp to be sure my new page is used.

Now, here is what happen :
- I cleaned my cookies and my browser cache
- I go to 192.168.0.236/alfresco
- I arrive to http://192.168.0.236/alfresco/faces/jsp/dashboards/container.jsp logged as guest
- I click on "Login (guest)"
- That takes me to a 404 : /alfresco/jsp/login.jsp
- I do a refresh (F5)
- A confirmation popup ask me if I want to repost the form. I answer yes.
- My new login page is displayed.

- I connect as admin/admin and arrive in the admin's "My Alfresco"
- I click "logout" and arrive on a 404 again
- I do a refresh (F5)
- A confirmation popup ask me if I want to repost the form. I answer yes.
- My new login page is displayed.

What's wrong ?

Thank you for your help

Outcomes