Expand my Community achievements bar.

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 4

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 4

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 4

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.