I'm using AEM 6.3
My servlet config is
@Component(service= Servlet.class, property={ Constants.SERVICE_DESCRIPTION + "=Example Servlet", "sling.servlet.methods=" + HttpConstants.METHOD_GET, "sling.servlet.resourceTypes="+ "my-project/components/general/my-component ", "sling.servlet.extensions=" + "html", "sling.servlet.selectors=" + "simple" })
As you can see I'm not using a page as a resourceType so I'm a little confused. Can anyone tell me what will be the url to hit on browser so it runs my doGet Method. And yes My servlet works as I have tested it by giving path.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Drop my-component in any page and hit that path along with extension and selector with which you registered Servlet. For example
selector and extension must be same as you provided in
sling.servlet.extensions
sling.servlet.selectors
Drop my-component in any page and hit that path along with extension and selector with which you registered Servlet. For example
selector and extension must be same as you provided in
sling.servlet.extensions
sling.servlet.selectors
Views
Replies
Total Likes
Views
Replies
Total Likes
http://localhost:4502/content/my-project/homepage/profile-page/test/en/par/my-component.simple.html This is what I'm using. I have updated my code in question to be more realistic.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks a lot. Such a silly mistake on my part. I had another question though. since we are talking in the url we see "par" in reality I have 2 parsys with different names. Is there a way to get the servlet working in both pasrs. I mean whichever parsys the author uses
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Create a page and add ur component on that page, try to access that page with selectors and extension.
like-
https://localhost:4502/content/simpleproject/test.simple.html
Views
Likes
Replies
Views
Likes
Replies