Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Error on hitting Custom Servlet

Avatar

Level 3

Hi all,

 

I have created a service to upload a file on google drive and created a servlet to call the service. When I hit the url defined in servlet I get "A custom errorhandler for 404 responses"

 

I have used Java-Okhttp to get the accestoken in the sevice.

So, please can anyone help me to resolve the problem

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Check if your servlet is in active state by visiting http://localhost:4502/system/console/components. Check what are all the paths allowed in OSGi configuration Apache Sling Servlet / Script Resolver and Error Handler. Also try to register servlet with some other path and verify if it is working.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @janhavi_singh ,

Please test whether your servlet request here is responsible to handle that request by visiting http://localhost:4502/system/console/servletresolver 


aem-servlet-resolver-test.jpeg

Might be multifarious reasons,
Check your servlet is in active status, is your dispatcher blocking request - check it hitting on publisher.

Hope that helps!

Regards,

Santosh
 

Avatar

Level 2

Hi @janhavi_singh : Check if servlet is in active state also check if the servlet path getting resolved. Check error logs for more details on what is the cause of the issue. Please provide more details so we can help you to resolve the problem.

Avatar

Correct answer by
Level 2

Check if your servlet is in active state by visiting http://localhost:4502/system/console/components. Check what are all the paths allowed in OSGi configuration Apache Sling Servlet / Script Resolver and Error Handler. Also try to register servlet with some other path and verify if it is working.