Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

AEM 6.2 httpservlet request getPathInfo returns null


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


Level 1

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


Level 4


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! 


Level 9


Make sure http jetty bundle is 3.0.2 or higher.