AnsweredAssumed Answered

Create a register page in alfresco share

Question asked by thinhnk on Jan 20, 2013
I want to have a register page for alfresco share. I add a new page to alfresco ant put a form in it. The form similar to
<form method="POST" action="register">
<label>User Name:</label>
<input type="text" name="username"/>
<label>Password:</label>
<input type="password" name="username"/>
</form>
Then I create a RegisterController. In it, I login as admin role then create new account for alfresco. Then I config custom-slingshot-application-context.xml and put it into C:\Alfresco\tomcat\shared\classes\alfresco\web-extension
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:hz="http://www.hazelcast.com/schema/config"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                http://www.hazelcast.com/schema/config
                http://www.hazelcast.com/schema/config/hazelcast-spring.xsd">
    <bean id="webframeworkHandlerMappings" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" abstract="true">
        <property name="urlPathHelper" ref="urlPathHelper" />
        <property name="pathMatcher" ref="pathMatcher" />
        <property name="interceptors">
            <list>
                <ref bean="requestContextInterceptor"/>
                <ref bean="userDashboardInterceptor"/>
                <ref bean="editionInterceptor"/>
            </list>
        </property>
        <property name="mappings">
            <value>
                /register/**=registerController
            /doTest/**=testController
            </value>
        </property>
    </bean>  
   <bean id="registerController" class="metadata.registration.RegisterController">
   </bean> 
   <bean id="testController" class="metadata.registration.TestController">
   </bean> 
</beans>
I also take a TestController to check if the java code is active. It is coppied from LoginCtroller, and it seem to work. But when I call Register Controller from the form, nothing happens. Did I so anything wrong. Thanks you for your helpful.

Outcomes