Author: ppenicka
Date: 2012-11-02 12:50:23 -0400 (Fri, 02 Nov 2012)
New Revision: 8948
Modified:
epp/docs/branches/5.2/Reference_Guide/en-US/Revision_History.xml
epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment.xml
epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment/NavigationController.xml
Log:
BZ#794099 - added info about creation of custom error pages.
Modified: epp/docs/branches/5.2/Reference_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide/en-US/Revision_History.xml 2012-11-01 21:54:20
UTC (rev 8947)
+++ epp/docs/branches/5.2/Reference_Guide/en-US/Revision_History.xml 2012-11-02 16:50:23
UTC (rev 8948)
@@ -8,6 +8,20 @@
<simpara>
<revhistory>
<revision>
+ <revnumber>5.2.2-110</revnumber>
+ <date>Fri Nov 2 2012</date>
+ <author>
+ <firstname>Petr</firstname>
+ <surname>Penicka</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>BZ#794099 - added info about creation of custom error
pages.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>5.2.2-109</revnumber>
<date>Thu Nov 1 2012</date>
<author>
Modified:
epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment/NavigationController.xml
===================================================================
---
epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment/NavigationController.xml 2012-11-01
21:54:20 UTC (rev 8947)
+++
epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment/NavigationController.xml 2012-11-02
16:50:23 UTC (rev 8948)
@@ -391,6 +391,54 @@
</listitem>
</itemizedlist>
</section>
+ <section id="sect-Reference_Guide-Creating_Custom_Error_Pages">
+ <title>Custom error pages</title>
+ <para>
+ When an HTML error code is returned as a response to a URL request (e.g. 404 Not
Found), JBoss Enterprise Portal Platform redirects users to a default error page where the
error code is displayed together with an explanatory message. To replace the default error
page with a customized one, the configuration explained below needs to be performed.
+ </para>
+ <procedure>
+ <title>Configuring redirection to custom error pages</title>
+ <step>
+ <para>
+ Create the actual error pages and place them in the
<filename>EPP_HOME/jboss-as/server/PROFILE/deploy/gatein.ear/02portal.war/</filename>
directory.
+ </para>
+ </step>
+ <step>
+ <para>
+ For each error code that shall have its custom error page, add the
<literal><error-page></literal> element to the
<filename>EPP_HOME/jboss-as/server/PROFILE/deploy/gatein.ear/02portal.war/WEB-INF/web.xml</filename>
file. This element specifies what page is displayed when the particular error code is
returned.
+ </para>
+ <para>
+ The sample code below ensures that the <filename>my404.html</filename>
page is displayed when the 404 error code is returned.
+<programlisting language="XML"><![CDATA[
+<error-page>
+ <error-code>404</error-code>
+ <location>/my404.html</location>
+</error-page>
+]]></programlisting>
+ </para>
+ </step>
+ <step>
+ <para>
+ Specify the error page locations as static resources in the
<filename>EPP_HOME/jboss-as/server/PROFILE/conf/gatein/controller.xml</filename>
file. The code sample below demonstrates this configuration for the
<filename>/my404.html</filename> path.
+<programlisting language="XML"><![CDATA[
+<route path="/my404.html">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+</route>
+]]></programlisting>
+ </para>
+ <para>
+ Without this configuration, the portal tries to resolve
<filename>/my404.html</filename> as a name of a portal or another resource.
This results in unwanted redirection to
<filename>/portal/my404.html</filename>. It is therefore necessary to
configure the error page locations as static resources.
+ </para>
+ </step>
+ <step>
+ <para>
+ When all the previous steps are performed, users are redirected to the specified
custom error pages when the respective error codes are returned as a response to a URL
request.
+ </para>
+ </step>
+ </procedure>
+ </section>
</section>
</section>
<section
id="sect-Reference_Guide-Navigation_Controller_-Integrate_to_JBoss_Enterprise_Portal_Platform_WebUI_framework">
Modified: epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment.xml 2012-11-01
21:54:20 UTC (rev 8947)
+++ epp/docs/branches/5.2/Reference_Guide/en-US/modules/PortalDevelopment.xml 2012-11-02
16:50:23 UTC (rev 8948)
@@ -20,4 +20,3 @@
<!-- DOC NOTE: JavaScript Configuration section removed as per instruction
from Thomas Heute -->
<xi:include href="PortalDevelopment/NavigationController.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</part>
-