I am trying to override LoginPost.java.
I am following below approach.I am using sdk2 for development.
I have created xxx-context.xml within /alfresco/extension folder with bean(if this approach is not proper hten let me know proper approach for overriding existing webscript).
<bean id="webscript.org.alfresco.repository.login.post" class="org.alfresco.repo.web.scripts.bean.LoginPost" parent="webscript">
<property name="authenticationService" ref="AuthenticationService" />
<property name="eventPublisher" ref="eventPublisher" />
</bean>
It is working fine within sdk but as I am deploying amps to community then its not working.
I have found issue that it is not taking my customized webscript instead it is taking exsiting loginpost.
I have rename the name of my project jar within alfresco-community\tomcat\webapps\alfresco\WEB-INF\lib\ to aaa.jar then its working means jar file is loaded alphabetical order.
How to solve this issue.
Help will be appreciated.
Jeff Potts
Francesco Corti
Please comment on this.
Hi Sanjay,
Which Alfresco version are you using?
And which version of SDK?
I have solve it by doing this way.
/alfresco/extension/custom-web-context.xml
<bean id="webscript.org.alfresco.repository.login.post" class="org.alfresco.repo.web.scripts.bean.CustomLoginPost" parent="webscript">
<property name="authenticationService" ref="AuthenticationService" />
</bean>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.