Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Jsp resolution via selector vs include & variable

stephenwil
Level 2
Level 2

In adobe AEM (aka cq), for a given url is it possible to see what jsp's are being invoked?

We've got example code, not written by us where 2 sets of 'base' jsp are being matched if a specific selector is present or not - 'm' for mobile. In the base jsp a variable is then set to flag if a mobile or desktop device is requesting.

From then on no further selectors are used - just checks on the variable to specifically include mobile specific jsp or not.

A different approach from solely using selectors to invoke specific jsp or not.

By having the script resolution traced it helps visualise and debuts, but is this a common pattern for sling based code?

1 Accepted Solution
om_vineet
Correct answer by
Level 2
Level 2

You could see all the JSPs being invoked from recent requests under system console. By default, this just captures the last 20 requests but is configurable.

From maintainability point of view, I would suggest to use specific selector to invoke a particular jsp/code.

Do let me know if you have any other queries.

View solution in original post

1 Reply
om_vineet
Correct answer by
Level 2
Level 2

You could see all the JSPs being invoked from recent requests under system console. By default, this just captures the last 20 requests but is configurable.

From maintainability point of view, I would suggest to use specific selector to invoke a particular jsp/code.

Do let me know if you have any other queries.

View solution in original post