Adobe AD0-E116 Practice Test - Questions Answers, Page 2

List of questions
Question 11

The dependency of an AEM project fails when a developer configures using Apache Maven. Refer to the error information below.
INFO] ---------------------------------------
[ ERROR] COMPILATION ERROR :
[INFO] ---------------------------------------
[ ERROR ]
/training/core/src/main/java/com/adobe/training/core/listeners/SimpleResourceListener.java:[18,28 ] package org.apache.sling.api does not exist [ERROR] /training/core/src/main/java/com/adobe/training/core/filters/LoggingFilter.java:[26,28] package org.apache.sling.api does not exist [ERROR] /training/core/src/main/java/com/adobe/training/core/filters/LoggingFilter.java:[27,31] package org.apache.sling.engine does not exist [ERROR]
/training/core/src/main/java/com/adobe/training/core/models/HelloWorldModel.java:[22,37] package org.apache.sling.api.resource does not exist [ERROR]
/training/core/src/main/java/com/adobe/training/core/models/HelloWorldModel.java:[25,33] package org.apache.sling.api.settings does not exist [ERROR]
/training/core/src/main/java/com/adobe/training/core/models/HelloWorldModel.java:[31,13] cannot find symbol symbol: class SlingSettingsService location: class com.adobe.training.core.models.HelloWorldModel What should a developer add to the pom.xml to fix the Maven build?
Question 12

AEM is installed in $AEM_HOME.
In which subfolder are the command line startup and shutdown scripts located?
Question 13

Two AEM publish instances feed a single Dispatcher.
Which part of the Dispatcher configuration should a developer review to ensure both AEM publish instances are used?
Question 14

In which maven build phase is the content package assembled?
Question 15

The developer is presented with a component "Component A" which inherits from a component "Component B".
The dialog of Component A on path ../cq:dialog/../../items looks like:
+ align
- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/select"
- fieldLabel="Align Text"
- name="./align"
The dialog of Component B on path ../cq:dialog/../../items looks like:
+ title
- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
- fieldLabel="Title"
- name="./title"
+ description
- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
- fieldLabel="Description" - name="./description"
The requirement for the dialog is that the *Align Text* field is shown after the *Title* field.
What should the developer do without changing Component B?
Question 16

A developer is working on the following Sling Model that is being used in a component
@Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class SampleModel {
@Inject
private Page currentPage;
private boolead matchingTitle;
@PostConstruct
private void init(){
matchingTitle = title.equals(currentPage.getName());
}
public boolean isMatchingTitle(){ return matchingTitle;
}
}
The model must check if the configured value of the jct:title property for the component matches the same name of the current page. If the jcr:title property of the component has NOT been configured, then isMatchingTitle() must return false.
How should the developer inject the title property in this model?
Question 17

How should a developer configure the replication agent to flush the dispatcher cache for a newly activated page?
Question 18

In which two ways can a developer keep simple and maintanable CRX Access Control Lists? (Choose two) Use Deny statements extensively
Question 19

A developer determines that the dispatcher is NOT refreshing the cached page
/content/sampleproject/sample.html after it is updated.
The dispatcher.any contains the following entries:
/cache
{
/docroot "/opt/dispatcher/cache"
/statfile "/tmp/dispatcher-website.stat"
/statfileslevel "2"
/rules
{
/0000 { /glob "*" /type "allow" }
}
/invalidate
{
/0000 { /glob "*" /type "deny" }
}
}
Refer to the $DOCROOT directory below:
[ user@group /opt/dispatcher/cache]$ ls βla
total 2
drwxr-xr-x. 5 apache apache 4096 Feb 11 11:41 .
drwxr-xr-x. 3 apache apache 4096 Nov 29 16:07 ..
drw-r--r--. 4 root root 4096 Feb 7 03:21 content
- rw-r--r--. 1 apache apache 0 Feb 7 03:19 .stat
The dispatcher needs to cache the page and refresh it after it gets updated.
What action should the developer take to meet these requirements?
Question 20

After a recent code deployment, an AEM site is experiencing longer than usual query execution time.
The deployment package contained some new Lucene index definitions. A developer needs to identify the long running queries and confirm that the new index definitions are getting applied correctly. Which action should the developer take to investigate this problem?
Question