Adobe AD0-E134 Adobe Experience Manager Sites Developer Exam Practice Test

Page: 1 / 14
Total 50 questions
Question 1

A developer is using sling context-aware configuration trying to get the configuration resource using:

This works as intended in author and in publish when logged in lo publish as admin. However this gives a null when run as anonymous. Which method is going to fix the issue?



Answer : A

The issue arises because the anonymous user does not have the necessary read permissions for the /content directory. When using Sling context-aware configurations, access to the configuration resource is required. If the anonymous user lacks read permissions, the configuration cannot be retrieved, resulting in a null value.

To fix this issue, you need to grant read permissions to the anonymous user for the /content directory.

Steps to apply read permissions:

Access CRXDE Lite: Log into your AEM instance and navigate to CRXDE Lite (http://localhost:4502/crx/de).

Navigate to the /content Directory: In the CRXDE Lite interface, browse to the /content directory.

Set Permissions:

Right-click on the /content directory and select 'Permissions'.

Add the anonymous user (if not already present).

Grant read permissions to the anonymous user.

Save Changes: Apply the changes and ensure that they are saved correctly.

Test the Configuration: Log out of the AEM instance and test the context-aware configuration as an anonymous user to ensure that the configuration resource can now be retrieved.

By granting read permissions to the anonymous user for the /content directory, you allow access to the necessary configuration resources, resolving the issue.


Adobe Experience Manager Security Permissions

Question 2

A client has asked to share an HTML version of test coverage report for the AEM project.

What plugin should the AEM developer use to generate test coverage report using latest archetype?

A)

B)

C)



Answer : A

To generate a test coverage report for an AEM project using the latest archetype, the correct plugin to use is the maven-surefire-plugin (Option A). The maven-surefire-plugin is a part of the Maven ecosystem and is widely used to run unit tests within a Maven project. This plugin can be configured to generate detailed test reports, including HTML versions, which can be easily shared with clients.

Here's how to configure the maven-surefire-plugin to generate test coverage reports:

Add the Plugin to the POM File: Add the maven-surefire-plugin configuration in your pom.xml file:

<groupId>org.apache.maven.plugins</groupId>

maven-surefire-plugin

<version>2.22.2</version>

<configuration>

<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>

<reportFormat>html</reportFormat>

<trimStackTrace>false</trimStackTrace>

</configuration>

Execute the Maven Command: Run the following command to execute the tests and generate the coverage report:

mvn clean test

Locate the Report: The HTML test coverage report will be generated in the target/surefire-reports directory of your project.


Maven Surefire Plugin Documentation

Question 3

A developer is working on a project based on core components. The client requests that text pasted inside the Text component should be stripped of all styling and formatting.

The developer needs to override RTE plugin implementation and change the default paste (CTRL+V) behavior.

Which paste option should the developer add to achieve this?



Answer : B

To ensure that text pasted inside the Text component in AEM is stripped of all styling and formatting, you need to override the RTE (Rich Text Editor) plugin implementation and change the default paste behavior. The correct option to achieve this is defaultPasteMode=plaintext.

Steps to configure the RTE plugin for plain text pasting:

Locate the RTE Configuration: Find the existing configuration for the RTE or create a new one in the /apps directory of your AEM project.

Modify the Plugin Configuration: Add or update the configuration to include the defaultPasteMode parameter. The configuration might look something like this:

{

'jcr:primaryType': 'nt:unstructured',

'features': '[text]',

'defaultPasteMode': 'plaintext'

}

Apply the Configuration: Ensure that this configuration is applied to the Text component. This typically involves updating the component dialog or design dialog to reference the updated RTE configuration.

Test the Configuration: In the AEM author instance, open the page with the Text component and paste text using CTRL+V. The pasted text should now be stripped of all styling and formatting, adhering to the plaintext mode.

By setting defaultPasteMode to plaintext, you ensure that the RTE only accepts plain text input, removing any formatting that might come from external sources.


AEM Rich Text Editor (RTE) Documentation

Configuring the Rich Text Editor in AEM

Question 4

Which query parameter needs to be added and set to true to debug a CQ HTML client library in the AEM author instance?



Answer : A

To debug a CQ HTML client library in the AEM author instance, you need to add the query parameter debugClientLibs set to true. This parameter instructs AEM to include additional debugging information for client libraries, making it easier to troubleshoot issues with JavaScript, CSS, and other assets.

Steps to enable client library debugging:

Open the AEM Page: Navigate to the AEM page where you want to debug the client libraries.

Append the Query Parameter: Add ?debugClientLibs=true to the URL. For example:

http://localhost:4502/content/we-retail/us/en.html?debugClientLibs=true

Reload the Page: Refresh the browser page. AEM will now include debugging information for client libraries.

This parameter helps in identifying issues with client library loading, dependencies, and other client-side resources.


Debugging Client Libraries in AEM

Question 5

A developer has multiple LDAP Authentication providers. The user is not required to pass the authentication test of the Authentication provider

* If authentication succeeds, control is returned to the caller; no subsequent Authentication provider down the list Is executed.

* If authentication fails, authentication continues down the list of providers.

What should be the JAAS Control flag value in Apache Jackrabbit Oak External Login Module configuration?



Answer : A

The JAAS Control flag SUFFICIENT is used when you have multiple LDAP authentication providers and you want the following behavior:

Immediate Return on Success:

If authentication succeeds with the current provider, control is returned to the caller immediately, and no subsequent providers in the list are executed.

This is efficient and reduces unnecessary processing if a user's credentials are successfully authenticated by one of the initial providers.

Continue on Failure:

If authentication fails with the current provider, the authentication process continues down the list of providers until a successful authentication occurs or all providers are exhausted.

This ensures that all available providers are tried before authentication is ultimately denied.

The SUFFICIENT control flag is thus well-suited for configurations where multiple authentication providers are used, and only one successful authentication is needed to grant access.


Apache Jackrabbit Oak Documentation

JAAS Control Flags

Question 6
Question 7

A development team is starting a new AEM project that is going to integrate with the Adobe Commerce platform. The developer needs to create a new AEM project using the Maven command line interface.

How can the 'mvn -B archetype:generate' command help the developer with the integration between AEM and Adobe Commerce?



Page:    1 / 14   
Total 50 questions