Author: mmcallis
Date: 2008-02-17 20:52:50 -0500 (Sun, 17 Feb 2008)
New Revision: 10008
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
Log:
5.2.4.1. Introduction
5.2.4.2. Package Structure
minor revisions
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
---
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-02-17
23:15:32 UTC (rev 10007)
+++
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-02-18
01:52:50 UTC (rev 10008)
@@ -1239,7 +1239,8 @@
</para>
<para>
<screen><![CDATA[
-INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfsunriportlet,
warUrl=.../tmp/deploy/tmp9138helloworldjsfsunriportlet-exp.war/]]>
+INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfsunriportlet,
+warUrl=.../tmp/deploy/tmp9138helloworldjsfsunriportlet-exp.war/]]>
</screen>
</para>
<para>
@@ -1319,30 +1320,34 @@
</sect3>
</sect2>-->
<sect2 id="myfaces_42x">
- <title>A simple MyFaces JSF Portlet on JBoss AS 4.2</title>
+ <title>An example Apache MyFaces JSF Portlet</title>
<sect3>
<title>Introduction</title>
- <para>This section will introduce the reader to deploying a simple JSF
portlet in JBoss Portal, using
- Apache's MyFaces JSF implementation on JBoss AS 4.2. It requires you
download the HelloWorldJSFMyFaces42Portlet
- from
PortletSwap.com, using this link:
- <ulink
url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles...;.
- There are actually different ways to do it, one would be to use MyFaces
globally for the whole server and replace the Sun RI
- libraries by the myFaces ones, but in this section the portlet will not
affect the application server and embed its
- own libraries.
- </para>
+ <para>
+ This section describes how to deploy a JSF portlet in JBoss Portal, using the
Apache MyFaces JSF implementation in JBoss AS or JBoss EAP. Before proceeding, download
the <ulink
url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles...
from <ulink
url="http://labs.jboss.com/portletswap/">JBoss
PortletSwap</ulink>.
+ </para>
+ <para>
+ Apache MyFaces can be used globally for the entire server, replacing the Sun JSF RI
libraries, but the HelloWorldJSFMyFaces42Portlet uses its own libraries, and will not
affect the application server.
+ </para>
</sect3>
<sect3>
- <title>Package Content</title>
+ <title>Package Structure</title>
+ <para>
+ JBoss Portal requires certain descriptors to be included in a portlet WAR file.
Some of these descriptors are defined by the JSR-168 Portlet Specification, and others are
specific to JBoss Portal. Like a typical JSF application, the
HelloWorldJSFMyFaces42Portlet package contains a
<filename>faces-config.xml</filename> file that defines managed-beans,
converters, validators, navigation rules, and so on. The following is an example of the
directory structure of the HelloWorldJSFMyFaces42Portlet portlet:
+ </para>
<para>
<mediaobject>
<imageobject>
<imagedata align="center"
fileref="images/tutorials/jsf_portlet/package_myfaces42.png"
valign="middle"/>
</imageobject>
</mediaobject>
- Like a typical JSF application, we also package our faces-config.xml that
defines our
- managed-beans, converters, validators, navigation rules, etc...
- The <filename>WEB-INF/lib</filename> must contain the MyFaces
libraries along with dependent libraries.
+ </para>
+ <para>
+ To create the <filename>WEB-INF/</filename> and
<filename>META-INF/</filename> directories, extract the
<filename>helloworldjsfmyfacesportlet.war</filename> file. The
<filename>WEB-INF/lib/</filename> directory must contain the MyFaces
libraries, along with the dependent libraries.
</para>
+ </sect3>
+ <sect3>
+ <title>Application Descriptors</title>
<para>For the sake of brevity, we only discuss the
<literal>portlet.xml</literal>, <literal>web.xml</literal> and
<literal>faces-config.xml</literal> descriptors here. For
discussion on the other descriptors, please
view <xref linkend="first_portlet_descriptors"/> or the
chapter on descriptors:
@@ -1441,12 +1446,15 @@
</para>
</sect3>
<sect3>
- <title>Building and deploying your portlet</title>
+ <title>Building your Apache MyFaces JSF Porlet</title>
<para>If you have downloaded the sample, you can execute the build.xml
with ant or inside your IDE.
Executing <literal>ant</literal> will compile all source files
and produce a
<literal>helloworldjsfportlet.war</literal> file in a way
similar to what we saw in
<xref linkend="first_portlet_build"/>.
</para>
+ </sect3>
+ <sect3>
+ <title>Deploying your Apache MyFaces JSF Portlet</title>
<para>
Deploying the portlet is as easy as copying/moving the
<literal>helloworldjsfmyfacesportlet.war</literal> file
to the server <literal>deploy</literal> directory. We can then
see our portlet on the Portal default