05-24-2019 07:27 AM
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.
05-28-2019 05:00 AM
Hi Sanjay,
Which Alfresco version are you using?
And which version of SDK?
05-28-2019 08:16 AM
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>
Explore our Alfresco products with the links below. Use labels to filter content by product module.