Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

AEM6 Sightly. Response sendError.

Avatar

Level 4

Hello,

Is it possible to execute "response.sendError(404)" inside sightly template?

Or I need to create a jsp and use data-sly-include?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Employee

You can via the data-sly-use. Not directly in the template.

For example, if you extend WCMUse, you can do:

getResponse().sendError(...)

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

You can via the data-sly-use. Not directly in the template.

For example, if you extend WCMUse, you can do:

getResponse().sendError(...)