Hi,
I am trying to read a property from /etc/abx/xyz/* path which has stored data through the system user. I am fetching the node property value through the sling model on a page where I want to use this data, It is working fine both in local and publish instances but when I check on dispatcher it is not working. I have checked the dispatcher logs which show a 404 not found message.
I have added a filter rule i.e is /0151 { /type "allow" /url "/etc/abx/*" }, it is not working.
Can anyone help me with this.
Solved! Go to Solution.
Views
Replies
Total Likes
Your dispatcher.any configuration looks correct. The best way to pinpoint the underlying cause of this issue will be to debug this. Enable your Apache web server and dispatcher logs, try the configurations below. At the same time, in your AEM development environment tail /crx-quickstart/logs/error.log. WIth all these logs available to you, the cause will present itself immediately. Good luck!
<IfModule disp_apache2.c>
...
DispatcherLogLevel 4 // trace mode
</IfModule>
...
<VirtualHost>
...
LogLevel info rewrite:trace5
</VirtualHost>
The logs would give you a detailed explanation of whether the resource has constraints or not.
I have just noticed that you want to read a property located at /etc/abx/xyz/* and the corresponding dispatcher rule is /0151 { /type "allow" /url "/etc/xyz/*" } which doesn't seem to be right to allow /etc/abx/xyz/*. Could you please try updating your rule like below:
/0151 { /type "allow" /url "/etc/abx/xyz/*" }
Regards,
Arpit
Your dispatcher.any configuration looks correct. The best way to pinpoint the underlying cause of this issue will be to debug this. Enable your Apache web server and dispatcher logs, try the configurations below. At the same time, in your AEM development environment tail /crx-quickstart/logs/error.log. WIth all these logs available to you, the cause will present itself immediately. Good luck!
<IfModule disp_apache2.c>
...
DispatcherLogLevel 4 // trace mode
</IfModule>
...
<VirtualHost>
...
LogLevel info rewrite:trace5
</VirtualHost>
The logs would give you a detailed explanation of whether the resource has constraints or not.
If I understand you correctly, you are doing this access as part of a SlingModel, meaning that your browser does not a request to /etc/. Is that correct?
Because in that case the dispatcher itself is not involved, because it just receives a HTML response from publish, and the dispatcher does not know how the publish internally assembled this response. In that case your problem is different.
Thank you Jorg.
Yes, we are using the sling model to read etc property data, If we move the same data to /content folder then sling model is able to read the data and display it on the page.
Views
Likes
Replies
Views
Likes
Replies