Posts

Showing posts from September, 2021

1. Create AEM project using arch type 23

  Topic to cover Create AEM project using maven archtype 23 1. How to create a project 2. How to add core component to project 3. How to add ACS common to project 4. How to add third party bundle/jar to project .  Inside .m2 have below setting.xml <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.  You may obtain a copy of the License at     http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See...

Sling Servlet

Image
 Lets start with code and understand line by line. @Component(service = { Servlet.class }) @SlingServletResourceTypes(         resourceTypes="reactLearning/components/page",         methods=HttpConstants.METHOD_GET,         extensions="txt") @ServiceDescription("Simple Demo Servlet") public class SimpleServlet extends SlingSafeMethodsServlet { @Component: Identify the annotated class as a Service Component. The annotated class is the implementation class of the Component. This annotation is not processed at runtime by Service Component Runtime. It must be processed by tools and used to add a Component Description to the bundle. Service Property: This signifies the types under which to register this component as a service. In our case, the component is registered under the Servlet type.