on 08-27-2015 3:36 PM
Hi All,
After removing url encoding attributes from url, it isnot landing on previous page after login...it is landing on home page....
If anyone have any idea please let me know.
Thanks
Navneet
check the code in class WebHttpSessionRequestCache. your contextPath is empty and this is why the relURl="/".
String modifiedContextPath = contextPath;
final String urlEncodingAttributes = getSessionService().getAttribute(WebConstants.URL_ENCODING_ATTRIBUTES);
if (urlEncodingAttributes != null && !url.contains(urlEncodingAttributes)
&& modifiedContextPath.contains(urlEncodingAttributes))
{
modifiedContextPath = StringUtils.remove(modifiedContextPath, urlEncodingAttributes);
}
if (StringUtils.isEmpty(relUrl) || StringUtils.isEmpty(modifiedContextPath))
{
relUrl = "/";
}
else
{
relUrl = relUrl.substring(relUrl.indexOf(modifiedContextPath) + modifiedContextPath.length());
}
return relUrl;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navneet,
Please find below the workaround for your need.
In spring-security-config.xml located in hybris\bin\ext-template\yacceleratorstorefront\web\webroot\WEB-INF\config, update excludeRedirectUrlRequestMatcher bean as given below.
<bean id="excludeRedirectUrlRequestMatcher" class="de.hybris.platform.yacceleratorstorefront.security.ExcludeUrlRequestMatcher">
<property name="excludeUrlSet">
<set>
<value>/guest/.*</value>
<value>/orderConfirmation/.*</value>
<value>/login</value>
<value>/login/checkout</value>
</set>
</property>
The excludeUrlSet which contains the list of URLS for which the redirection is based on property defaultTargetUrl of bean loginAuthenticationSuccessHandler. You can modify the property to "/" if you want to redirect to your homepage once you login or the page of your choice based on that property as shown below which is available in the same file.
<property name="defaultTargetUrl" value="/"/>
Thanks,
Jayahar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaykar,
I am using version 5.6 and I have remove siteid/language/currency from url. In product listing page,there is a link if user is not logged in then redirect it to login. After login it is landing on homepage I want previous page means in product listing page. It's working when I had not removed url encoding attributes.
Thanks
navneet
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.