Highlighted

Can someone help me?

adriianoakino

12-12-2017

I need the answer for this questions:

1) A developer or create a page with a blank template to test it full development? What is the best way?

2) what is a @ServletService of type Post ?

3) A developer has an instance installed running in author mode on port 4502, he wants that same instance to run in publish mode what he should do ?

4) A developer needs to use a copy of an image found in apps/foundation/components/image for the following path libs/foundation/components/image choose the best way to overwrite this image ?

5) When running the following mvn clean install command -PautoInstallPackage -Daem.port = 4503 Daem = 80, 80 represents what?

6) Maven uses pom.xml to manage its dependencies in the AEM framework. use a pom for each ... "core, it.launcher, it.test, ui.apps, ui.content" plus the main one for everyone because for each type of structure contains a type of pom.xml ?

7) which command is used to create a new test-type debug on port 80 ?

Replies

Highlighted

Ratna_Kumar

MVP

12-12-2017

Hi,

Here are the answers for your queries.

Q1) A developer or create a page with a blank template to test it full development? What is the best way?

Ans) Never create a page with blank template to test it in full development. You can play in your local instance by including the paysys on the page and by testing the component but never create a page with blank template to test it for full development

You can also create a Maven Archetype and use the default page to perform testing with components, etc, See - Creating an Adobe Experience Manager 6.3 Project using Adobe Maven Archetype 11

Q2) what is a @ServletService of type Post ?

Ans) Sling Post Servlet is basically if you want to Post/Modify any data on the page or a servlet then you can use this POST method in Sling Servlet. We have many of the articles listing of various use cases. Some of them below:

-> Apache Sling :: Manipulating Content - The SlingPostServlet (servlets.post)

-> Adobe Experience Manager Help | Submitting Adobe Experience Manager form data to Java Sling Servlets

Q3) A developer has an instance installed running in author mode on port 4502, he wants that same instance to run in publish mode what he should do ?

Ans) We have the topic of Run modes in AEM. There are two types of run modes.

     1) Primary Runmode

     2) Secondary Runmode.

Primary Runmode: Primary run modes used at the time of installation and are fixed for the entire lifetime of that installation.

Example: Author and Publish runmode. You cannot change the primary run mode once installed.

Secondary Runmode: Secondary run modes are applied on each start-up and can be changed with a restart of AEM instance. These are custom run modes defined for specific environment like development (config.author.dev), Testing(config.author.qa) or production(config.author.prod).

To see more on Run modes see this article: http://www.aemcq5tutorials.com/tutorials/set-up-run-modes-in-aem/

Q4) A developer needs to use a copy of an image found in apps/foundation/components/image for the following path libs/foundation/components/image choose the best way to overwrite this image ?

Ans) There is a concept of Overlay in AEM, You can copy the foundation components that present under /libs/foundation/components/* and place it in your App. But the problem is here, if you upgrade/put any hotfixes in AEM, then you need to again manually copy the updated component in your apps.

Instead of that you can also extend the component using sline:resourceSuperType property pointing towards the foundation component.

Q5) When running the following mvn clean install command -PautoInstallPackage -Daem.port = 4503 Daem = 80, 80 represents what?

Ans) Here 80 represents the port number. Never use this command in publish. It is recommended to build only in Author with mvn -PautoInstallPackage install or mvn clean install -PautoInstallPackage.

Q6) Maven uses pom.xml to manage its dependencies in the AEM framework. use a pom for each ... "core, it.launcher, it.test, ui.apps, ui.content" plus the main one for everyone because for each type of structure contains a type of pom.xml?

Ans) Yes you are correct. Maven uses pom.xml to manage its dependencies in AEM. Each module has own POM and remembe Parent pom is the most important one and all the dependencies are included here and where you can set Properties like aem.host: localhost, aem.port: 5502, aem.publish.port: 4503 etc., and it also includes all child modules like below.

<modules>

<module>core</module>

<module>ui.apps</module>

<module>ui.content</module>

<module>it.tests</module>

<module>it.launcher</module>

</modules>

Q7) which command is used to create a new test-type debug on port 80 ?

Ans) Can you please clear this question, I didn't get what exactly your question. Always please try to use mvn -PautoInstallPackage install to build the project.

Hope this helps!!

Thanks,

Ratna.