Expand my Community achievements bar.

AEM 6.2 httpservlet request getPathInfo returns null

Avatar

Level 2

We have written custom authentication handler extending org.apache.sling.commons.auth.spi.AuthenticationHandler
in which one of the method having HttpServletRequest request object when we call request.getPathInfo returning null in AEM 6.2
whereas working fine in AEM 5.4

could you please provide any inputs to resolve this issue?

3 Replies

Avatar

Level 1

Same problem here with AEM 6.2, you can use getRequestURI().

Avatar

Level 4

Hi, 

Are you using SlingServletHttpRequest? 

If yes, try this

RequestPathInfo pathInfo= request.getRequestPathInfo();    
String resPath= pathInfo.getResourcePath();

This will give you the path. 

And also make sure you are using right version of "org.apache.sling.api" according to the AEM 6.2. Find it through dependency finder http://localhost:4502/system/console/depfinder

Hope this helps! 

Avatar

Level 9

Hi,

Make sure http jetty bundle is 3.0.2 or higher.

Thanks,