Servlet not working on publish instance | Community
Skip to main content
June 2, 2016

Servlet not working on publish instance

  • June 2, 2016
  • 4 replies
  • 7025 views

I have a site set up on publish instance where I'm doing an ajax call to a servlet, however I'm not getting any response.

The servlet is also installed as an OSGi bundle in the back end of our publish instance.

I'm doing a POST call however I did notice that when I do a GET call it goes through. I've also checked the

Apache Sling Referrer Filter configuration and removed the 'POST' from 'Filter Methods', but still no luck.

Any thoughts guys?

 

Thanks!

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

4 replies

smacdonald2008
June 2, 2016

Are you getting 404?

GK-007
June 3, 2016

Have you checked whether this Servlet is resolving as resource ans sling Servlet or not from Felix console??

http://<hostname:port>/system/console/jcrresolver

http://<hostname:port>/system/console/servletresolver

Please post the response.

Thanks,

Kishore

kautuk_sahni
Community Manager
Community Manager
June 3, 2016

Hi, 

Please share the the error.log for publish instance and also the browser console error.

Is it working on Author?

You can debug the Servlet resolution in 2 ways:-

Here’s one way:
1.    Head over to http://localhost:4502/system/console/servletresolver
2.    Enter the request URL and select the appropriate HTTP method (http://localhost:4502/editor.html/content/we-retail.html)
3.    The Opting servlets will be listed – I think the ‘chosen’ one is on the top…

Here’s another:
1.    Head over to http://localhost:4502/system/console/requests and clear existing requests
2.    ‘Edit’ a ‘simple’ AEM site (e.g. navigate to http://localhost:4502/editor.html/content/we-retail.html)
3.    Refresh the page in #1 and locate your request
a.    It may happen that the page you are interesting in sends more than 20 requests – perhaps there’s a configuration to increase how many requests are ‘kept’ for analysis but I don’t know of it – instead, what you can try is to ‘cancel’ the page-load (so that further requests are not sent to the server)

The downside of 2nd method is limited requests can be tracked this way – the upside is that you get a lot more information that the 1st.

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
June 3, 2016

kautuksahni   I did the method you listed and here are the results attached:

[1]

[2]

Also I'm not getting an error page back

it seems like the page just hangs as in there is no response given possibly because the request

doesn't even make it to the servlet.

smacdonald2008
June 3, 2016

If you look at the AEM access.log are you seeing any information?