Author: mmcallis
Date: 2008-02-16 01:20:27 -0500 (Sat, 16 Feb 2008)
New Revision: 10000
Added:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_deploy.png
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_explode.png
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsp_portlet/jsp_ant_explode.png
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
Log:
5.2.3. An example Sun JSF Reference Implementation (RI) Portlet
* adding images of ant deploy and ant explode
* fixing my images that had a black line
* revising 5.2.3 to be consistent with 5.2.1. Deploying your first Portlet
and 5.2.2. An example JSP Portlet
Added:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_deploy.png
===================================================================
(Binary files differ)
Property changes on:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_deploy.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_explode.png
===================================================================
(Binary files differ)
Property changes on:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/jsf_ant_explode.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsp_portlet/jsp_ant_explode.png
===================================================================
(Binary files differ)
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-16
05:05:05 UTC (rev 9999)
+++
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-02-16
06:20:27 UTC (rev 10000)
@@ -1155,34 +1155,114 @@
</para>
</sect3>
<sect3>
- <title>Building and deploying your portlet</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>helloworldjspportlet.war</literal> file in a way
similar to what we saw in
- <xref linkend="first_portlet_build"/>.
+ <title>Building your JSF Portlet</title>
+ <para>
+ The <filename>HelloWorldJSFSunRIPortlet.zip</filename> file contains a
pre-compiled <filename>helloworldjsfsunriportlet.war</filename> file; however,
to manually build the <filename>helloworldjsfsunriportlet.war</filename>
file:
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Change into the <filename>HHelloWorldJSFSunRIPortlet</filename>
directory, and remove the existing
<filename>helloworldjsfsunriportlet.war</filename> file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ If required, edit the
<filename>HelloWorldJSFSunRIPortlet/src/main/org/jboss/portlet/hello/bean/User.java</filename>
file, and the XML descriptors in the
<filename>HelloWorldJSFSunRIPortlet/src/resources/helloworldjsfsunriportlet-war/WEB-INF/</filename>
directory.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change into <filename>HelloWorldJSFSunRIPortlet/</filename> directory,
and run the <command>ant deploy</command> command. On Linux, the output will
be similar to the following:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
fileref="images/tutorials/jsf_portlet/jsf_ant_deploy.png"
valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ <para>
+ Note: the directory names will be different for your system.
+ </para>
+ <para>
+ Expanding the <filename>helloworldjsfsunriportlet.war</filename> file
allows you to deploy the portlet as an expanded directory, which makes development easier.
As well, it gives you access to the XML descriptors, resource files, JSF, and JSP pages.
To expand the <filename>helloworldjsfsunriportlet.war</filename> file:
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ If you do not have the
<filename>HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war</filename>
file, change into the <filename>HelloWorldJSFSunRIPortlet/</filename>
directory, and run the <command>ant deploy</command> command. This creates the
<filename>helloworldjsfsunriportlet.war</filename> file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ To expand the war file, change into the
<filename>HelloWorldJSFSunRIPortlet/</filename> directory, and run the
<command>ant explode</command> command. On Linux, the output will be similar
to the following:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
fileref="images/tutorials/jsf_portlet/jsf_ant_explode.png"
valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ <para>
+ Note: the directory names will be different for your system.
+ </para>
+ <para>
+ The expanded war file and the XML descriptors are located in the
<filename>HelloWorldJSFSunRIPortlet/output/lib/exploded/helloworldjsfsunriportlet.war</filename>
directory.
</para>
- <!--
- <para>
- The <literal>explode</literal> target will produce the
following:
- <mediaobject>
- <imageobject>
- <imagedata align="center"
fileref="images/tutorials/jsf_portlet/exploded.gif"
valign="middle"/>
- </imageobject>
+ </sect3>
+ <sect3>
+ <title>Deploying your JSF Portlet</title>
+ <para>
+ If you did not expand the
<filename>helloworldjsfsunriportlet.war</filename> file, copy the
<filename>HelloWorldJSFSunRIPortlet/helloworldjsfsunriportlet.war</filename>
file into the correct JBoss AS or JBoss EAP <filename>deploy/</filename>
directory. If you expanded the
<filename>helloworldjsfsunriportlet.war</filename> file, copy the
<filename>HelloWorldJSFSunRIPortlet/output/lib/exploded/helloworldjsfsunriportlet.war/</filename>
directory into the correct JBoss AS or JBoss EAP <filename>deploy/</filename>
directory. For example, if you are using JBoss AS, copy the war file or the expanded
directory into the <filename>$JBOSS_HOME/server/default/deploy/</filename>
directory.
+ </para>
+ <para>
+ Performing this step on a running instance of JBoss AS or JBoss EAP, and JBoss
Portal, will trigger a hot-deploy of the portlet:
+ </para>
+ <para>
+<screen><![CDATA[
+INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfsunriportlet,
warUrl=.../tmp/deploy/tmp9138helloworldjsfsunriportlet-exp.war/]]>
+</screen>
+ </para>
+ <para>
+ To see the HelloWorldJSFPortlet, navigate to <ulink
url="http://localhost:8080/portal/">http://localhost:8080/portal/</ulink>,
or, if the default JBoss Portal page is already open, refresh the page. The
HelloWorldJSFPortlet is added to the bottom of the default JBoss Portal page:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
fileref="images/tutorials/jsf_portlet/output.png"
valign="middle"/>
+ </imageobject>
</mediaobject>
</para>
- -->
- <para>
- Deploying the portlet is as easy as copying/moving the
<literal>helloworldjspportlet.war</literal> file
- to the server <literal>deploy</literal> directory. We can then
see our portlet on the Portal default
- page (<ulink
url="http://localhost:8080/portal/">http://localhost:8080/portal/</ulink>):
- <mediaobject>
- <imageobject>
- <imagedata align="center"
fileref="images/tutorials/jsf_portlet/output.png"
valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
- </sect3>
- </sect2>
+ <para>
+ To re-deploy the portlet, for example, if you have made changes to any of the XML
descriptors, touch the
<filename>$JBOSS_HOME/server/<replaceable>configuration</replaceable>/deploy/helloworldjsfsunriportlet.war/WEB-INF/web.xml</filename>
file. On Linux, run the following command to re-deploy the HelloWorldPortlet:
+ </para>
+ <para>
+<screen>
+touch
$JBOSS_HOME/server/<replaceable>configuration</replaceable>/deploy/helloworldjsfsunriportlet.war/WEB-INF/web.xml
+</screen>
+ </para>
+ <para>
+ Re-deploying the HelloWorldJSFPortlet will produce output to the JBoss AS or JBoss
EAP console, similar to the following:
+ </para>
+ <para>
+<screen><![CDATA[
+INFO [TomcatDeployer] undeploy, ctxPath=/helloworldjsfsunriportlet,
+warUrl=.../deploy/helloworldjsfsunriportlet.war/
+INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfsunriportlet,
+warUrl=.../deploy/helloworldjsfsunriportlet.war/]]>
+</screen>
+ </para>
+ </sect3>
+</sect2>
<!--<sect2 id="sunri_42x_301">
<title>Portal and JSF RI: A basic demonstration using common
components</title>
<sect3>
Show replies by date