Sling Servlet 404 Not Found | Community
Skip to main content
sobhan_sahu
Level 4
Nov 6, 2017 1:43 PM UTC

Sling Servlet 404 Not Found

Hi All,

I have a simple sling servlet under /bin/myservlet. when I am trying to hit the same from my JSP using AJAX call in console it is saying 404Not Found.

I am using AEM 6.3 version. Please help on the same.

Thanks,
Sobhan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

manoj_devapath
Level 5
Nov 6, 2017 3:39 PM UTC

Can you pls hit your servlet on aem server and look at the logs. make sure you pass correct query parameter when hititng the servlet

Generally it should show throw some error if servlet is not resolved or not registered correctly in servlet

Translate
smacdonald2008
Level 10
Nov 6, 2017 2:24 PM UTC

Show your AJAX syntax

Translate
sobhan_sahu
Level 4
Nov 6, 2017 2:28 PM UTC

    $.ajax({

         type: 'POST',   

         url:'/bin/getCount',

         data:'id='+ "1111",

         success: function(msg){

 

           var myMsg = "hello";

alert(myMsg);

         }

     });

Translate
smacdonald2008
Level 10
Nov 6, 2017 2:18 PM UTC

Is your bundle in Active State?

Translate
sobhan_sahu
Level 4
Nov 6, 2017 2:22 PM UTC

Yes bundle is in active state and also servlet is getting resolved in the servlet resolver in ConfigMgr.

Only when I am trying to execute is in JSP via ajax call it is throwing 404 not found.

It is an AEM Forms JEE instance in JBoss.

Translate