ResourceType Servlet is not working in AEM SDK
Hi All,
I tried installing the WKND project into my local SDK and tried to access the default servlet. I am getting "NO RESOURCE FOUND" error while accessing in the browser.
Please help me on this.
Hi All,
I tried installing the WKND project into my local SDK and tried to access the default servlet. I am getting "NO RESOURCE FOUND" error while accessing in the browser.
Please help me on this.
Hi @shravanb2496924 ,
WKND Project comes with SimpleServlet.Java which has
resourceTypes="wknd/components/page"If you wish to access it with default servlet you may customize it like below
@Component(service = { Servlet.class })
@SlingServletResourceTypes(
resourceTypes="sling/servlet/default",
methods=HttpConstants.METHOD_GET,
extensions="txt")
@ServiceDescription("Simple Demo Servlet")
In this case you could be able to access servlet by visiting
http://localhost:4502/content/wknd/us/en.txt (Since .txt is an extension mentioned in above code snippet)
Make sure you are deploying project by right profile as below
mvn clean install -PautoInstallSinglePackage
Additionally, Please check if your WKND bundle is in Active state.
Reference: https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/project-archetype/project-setup.html?lang=en
Hope that helps!
Regards,
Santosh
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.