Hi All,
@SlingServlet(
paths = { "/content/data" }, generateComponent = false)
In couple of servlets, have seen the above. Went through http://sling.apache.org/documentation/the-sling-engine/servlets.html.
But could not get
a] What exactly is the purpose of generateComponent = false.
Any thoughts on this will be helpful.
Solved! Go to Solution.
Views
Replies
Total Likes
@slingServlet includes @Component internally and hence we dont use that annotation specifically which is nothing by generateComponent=true (refer [1]). This enables all the methods or life cycle of component like activate, deactivate etc...
If you are using @Component also along with your @slingServlet, then we need to use generateComponent=false for @slingServlet else it would have a conflict and throw an exception. refer [2]
[2] http://versatileankur.blogspot.com/2015/02/maven-scr-plugin-error-in-aem.html
Views
Replies
Total Likes
@slingServlet includes @Component internally and hence we dont use that annotation specifically which is nothing by generateComponent=true (refer [1]). This enables all the methods or life cycle of component like activate, deactivate etc...
If you are using @Component also along with your @slingServlet, then we need to use generateComponent=false for @slingServlet else it would have a conflict and throw an exception. refer [2]
[2] http://versatileankur.blogspot.com/2015/02/maven-scr-plugin-error-in-aem.html
Views
Replies
Total Likes
Hi Lokesh,
Thank you for your reply.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies