cancel
Showing results for 
Search instead for 
Did you mean: 

Storefront login page redirects to path with null value instead of j_spring_security_check

former_member583621
Participant
0 Kudos
1,101

We're doing a migration to Hybris 6.5, and while trying to login in the storefront, we are redirected to the path https://urreab2b.local:9002/urreab2bstorefront/urreab2b/es/USD/null instead of https://urreab2b.local:9002/urreab2bstorefront/urreab2b/es/USD/j_spring_security_check.

Due to this we get a error message "[hybrisHTTP3] [PageNotFound] Request method 'POST' not supported", which makes sense since the login page in the storefront isn't mapped to null.

We checked in accountReturningCustomerLogin.jsp and the value for loginActionUrl is set like this:

 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="user" tagdir="/WEB-INF/tags/responsive/user"%>
 
 <c:url value="/j_spring_security_check" var="loginActionUrl" />
 
 <div class="login-section">
     <user:login actionNameKey="login.login" action="${loginActionUrl}" />
 </div>

But whenever we open the login page in the storefront the action value for the login form is set to null:

We don't understand why the value for the login action url is being overwritten nor who is responsible for this, we've even tried to modify directly the action inside login.tag to /j_spring_security_check but even modifying the tag directly doesn't stop the action from being set to null.

Another thing we tried was to modify the action value using Chrome Developer Console, and although we are redirected to the URL https://urreab2b.local:9002/urreab2bstorefront/urreab2b/es/USD/j_spring_security_check, only then the login page is redirected correctly.

We printed on the JSP the value for action and the value it has is /urreab2bstorefront/urreab2b/es/USD/j_spring_security_check, so the value is arriving to the JSP correctly but the form is not taking it.

Does anyone know what might be the cause? Is it something Spring related or something related to Hybris configuration or something else?

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

I resolved this issue by correction to class DefaultRequestDataProcessor - where by removing accidental override of the processAction() method and also wrong implementation of method processAction() where i was returning null.

Former Member
0 Kudos

Hi Agustin, I got exactly same issue while migrating from v5.4 to v6.6. did you find any solution.

0 Kudos

Please let us know if you find the solution? We are upgrading from 5.2 to 6.7 and having exact same issue.

krishn_signet
Participant
0 Kudos

Can you just verify one small thing if you make any changes in login.tag then is it reflecting on UI as well. Because I remember making a stupid mistake of changing in desktop jsp and verifying in responsive view.

Former Member
0 Kudos

Hi Agustin - please let me know which version you are migrating from and which version to

shauryagupta
Advisor
Advisor
0 Kudos

Hi

I am facing the exact same issue while upgrading from 5.4 to 6.6. Have you @Augustin been able to resolve this and how did you resolve ?

Regards

Former Member
0 Kudos

Hi Agustin,

Depending on your previous hybris version and whether performing either a technical upgrade (core only) or functional upgrade (core + accelerator) - you could be still using Spring Version 3.x.x.

Please check that you are making use of Spring 4.x.x. and retest if that resolves the issue.

former_member583621
Participant
0 Kudos

how can we verify the spring version our enviroment is using? this migration is something another company started but was passed on to us so probably they didn't update the spring version.

I just checked the lib folder in storefront and there's a spring-security-taglibs-3.1.1.RELEASE.jar, how can we update it?

former_member583621
Participant
0 Kudos

I tried deleting spring-security-taglibs-3.1.1.RELEASE.d after an ant clean all and restarting my Hybris server I got several JasperException errors, with messages like org.apache.jasper.JasperException: /WEB-INF/tags/desktop/common/header/header.tag (línea: 42, columna: 3) Attribute ifAnyGranted invalid for tag according to TLD. We checked the tag and indeed it was using deprecated attribute, we replaced it with the latest header.tag but still the action is being set to null.