Adobe CQ Renders Pages with Custom Extension
You may already know CQ can render HTML pages with .html extension, I'd like to show you how to tell CQ to render pages with another custom extension. For example, instead of responding to http requests end with .html, we want CQ to respond to requests end with .foo.
In order to tell CQ to be able to deal with a custom request with a special page extension (e.g., .foo), you need to
Implement a component JSP file to render the page with .foo extension, and
Tell CQ that .foo extension is acceptable.
Here's the details of what you need to do:
#1) Implement component JSP to render page with .foo extension
Like many other CQ5 component, you should have known how to implement a CQ5 component in JSP, and what to name (according to url-to-script resolution rules) it so that it'll be used to render the page being requested. In our example case to render page with .foo extension, the JSP component can be named as foo.jsp. If you're not familiar with url-to-script resolution in Sling, please refer to other articles and tutorials first then come back to this article. In this post, I'd like to focus on the next step which is essential and is not quite clearly documented by Adobe.