title: AEM:: Error Handling using the acs-aem-commons package
body: <p>As defined here <a href="http://adobe-consulting-services.github.io/acs-aem-commons/features/errorpagehandler.html" rel="nofollow">http://adobe-consulting-services.github.io/acs-aem-commons/features/errorpagehandler.html</a> I am trying to confgure error pages for my application. Here is what I have done:</p>
  
  <p>1) Created 404.jsp and default.jsp at /apps/sling/servlet/errorhandler as defined on the page.</p>
  
  <p>2) Added below widget to the advanced tab:</p>
  
  <pre><code>&lt;errorpages
      jcr:primaryType="cq:Widget"
      path="/apps/acs-commons/components/utilities/errorpagehandler/dialog/errorpages.infinity.json"
      xtype="cqinclude"/&gt;
  </code></pre>
  
  <p>3) Created /apps//config/com.adobe.acs.commons.errorpagehandler.impl.ErrorPageHandlerImpl.xml</p>
  
  <p>with the following properties:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
      jcr:primaryType="sling:OsgiConfig"
      prop.enabled="{Boolean}true"
      prop.error-page.fallback-name="500"
      prop.error-page.system-path="/content/error"
      prop.error-page.extension="html"
      ttl="{Long}300"/&gt;
  </code></pre>
  
  <p>4) Created /content/myapp/en/errors using a fresh template. The template has only a parsys. Inside the /content/myapp/en/errors, I have created page 404 and 500 using the same template. In the video it is shown that when the speaker opens the pages 404.html and 500.html created under geometrixx from siteadmin he is able to see appropriate error messages. What I am not able to understand is that if my template consists of only a parsys how will the 404 and 500 pages show the error messge. From where are those messages being generated ? Am I missing something here ? Do I have to create any component ?</p>
  
  <p>5) In the Page Properties of the page /content/myapp/en , I have configured /content/myapp/en/errors as the Error Page. To generate a 404 error when I try to access the URL /content/myapp/ent.html instead of /content/myapp/en.html it throws a</p>
  
  <pre><code> No resource found
  
  Cannot serve request to /content/myapp/ent.html in /apps/sling/servlet/errorhandler/404.jsp
  </code></pre>
  
  <p>Not sure how do I get he nice looking pages as shown in the video.</p>
  
  <p>5) How can I make the error messages authorable ?</p>
  
  <p>Thanks in advance</p>