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

What's the recommended way to let a JSP file be accessed with .html extension?

Avatar

Level 7

Hi,

  1. What's the recommended way to implement pages that are shared deployment-wide? For example when we want to implement a page called "Under review" that based on some rules should be served to users in place of the actual pages of a website.
  2. We have a few JSP under /content/global-pages that we want to be accessible with .html extension. For example, there's a file /content/global-pages/under-review.jsp that should be accessible as www.foo.com/under-review.html. What's the recommended way to configure CQ 5 to perform this?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

in CQ/AEM pages are resources, which have a resource type. Based on this resourcetype the correct rendering logic (in many cases a JSP) is called to render this resource. So you never call a JSP directly.

To 1: You could implement a servlet filter, which checks for the "under review" conditions and then  does a redirect to your "under review" page.

To 2: As said, you cannot address JSPs directly. Create pages in /content, which have the proper resource type. And then put your JSPs below /apps. Basically create dedicated templates and components for this case.

 

Jörg

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

in CQ/AEM pages are resources, which have a resource type. Based on this resourcetype the correct rendering logic (in many cases a JSP) is called to render this resource. So you never call a JSP directly.

To 1: You could implement a servlet filter, which checks for the "under review" conditions and then  does a redirect to your "under review" page.

To 2: As said, you cannot address JSPs directly. Create pages in /content, which have the proper resource type. And then put your JSPs below /apps. Basically create dedicated templates and components for this case.

 

Jörg