Servlet not working on publish instance | Community
Skip to main content
Jun 2, 2016 8:15 PM UTC

Servlet not working on publish instance

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.

10 replies

Jun 3, 2016 6:01 PM UTC

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.

Translate
smacdonald2008
Level 10
Jun 3, 2016 6:09 PM UTC

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

Translate
kautuk_sahni
Employee
Jun 3, 2016 6:49 AM UTC

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

Translate
Kautuk Sahni
GK-007
Level 9
Jun 3, 2016 6:17 AM UTC

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

Translate
smacdonald2008
Level 10
Jun 2, 2016 10:23 PM UTC

Are you getting 404?

Translate