On Dispatcher POST/GET call with Selector is giving error but without selector it is working fine. But I want it to work with selector. I have allowed selector in filter still it is not working. This issue appeared after the shortening of the URL. Without shortening it was working fine.
My servlet is resource type binded with component
Solved! Go to Solution.
Views
Replies
Total Likes
If the URL works on postman means your Page is cached, try flushing dispatcher cache and then try on incognito window
Sure attached at top as well
http://dev.sample.com/en-us/bloglisting/blog/jcr:content/root/responsivegrid/imagedownloader.downloa...
Hi @Ronnie09
Can you share the error that you are seeing?
Also If you don't define extensions but define selectors, your selectors can be used with extensions which means you can call only with selector(/content/my-site/en.testing). But it is not recommended. Define both selectors and extensions.
Hope it helps!
Thanks,
Kiran Vedantam.
Through postman it is working fine now with selector and extension but on PAGE it is showing 301 redirect and converting POST call to GET
Which gives response header location as 404 page path
Which error are you getting? is it 40X? If so, it is clearly a dispatcher config issue, I think you have answered your own question, check the following:
1. The servlet is allowed (GET/POST) to the selector you are attempting to hit in the dispatcher filter configs
2. The rewrite rule is such, that you can get the full URL which will be understood by the publisher
3. Restart Apache to apply your changes.
For more details, you should set your dispatcher log's level to DEBUG and check what URL it is being hit, whit that info you will clearly see, if is it a correct (valid) URL that will be understood by the publisher. Is it being blocked?
Hello @Ronnie09
1. Please use an extension while accessing the resource.
- That provides a better understanding of the response type
- Selector would not be confused as extension
2. Please check the AEM publish logs and dispatcher logs. It will help you understand what request is hitting the publish server:
- Is any request hitting AEM publish?
- If yes, whats the URL?
- Does the URL give the expected results when accessed on publish directly?
Hi @aanchal-sikka
It is working now via postman but on Dispatcher URL first it is hitting full path of the servlet then its hitting shortened URL 2 calls are happening in total and giving 404 ... Same URL works on POSTMAN.
If the URL works on postman means your Page is cached, try flushing dispatcher cache and then try on incognito window