Getting started with JBoss Portlet Bridge JBoss Portlet Bridge not only gives you the ability to run JSF web applications in a portlet, but also gives you the benefit of running supported JBoss frameworks like Seam and RichFaces.
Bridge Frameworks and Extensions The JBoss Portlet Bridge currently supports JBoss Portal, JSF 1.2, JBoss Seam, and JBoss Richfaces. There are configurations that apply to supporting each framework. See section for instructions. The JBoss Portlet Bridge project is also actively developing extensions, or Bridgelets, that enhance or bring together features of JBoss Portal, Seam, and Richfaces. For example, the PortalIdentity seam component allows you to drop the jar in your classpath and you instantly have SSO between Seam and Portal. This extension can also be configured with additional attributes in your Seam application's components.xml file. Don't forget that the bridge is still in Beta and so are any extensions. If you would like to contribute to any part of this project, we encourage you to be active on the user forum and bring issues/enhancements to attention. Available Bridgelets Bridgelet Command Single Sign On By inlcuding the following dependency in your web pom, you will automatically have SSO between Jboss Portal and your Seam 2.0.x application. org.jboss.portletbridge.extensions.seam PortalIdentity 1.0.0-SNAPSHOT ]]> RichFaces Javascript Compatibility Richfaces does not account for multiple components on the same portal page by default. This bridgelet renders all RichFaces component javascript to be portal friendly. org.jboss.portletbridge.extensions.richfaces PortalResourceBuilder 1.0.0-SNAPSHOT ]]>
Before you start Current version and compatibilty information can be easily located on the JBPB wiki. Ensure you are using compatible versions of all integrated frameworks before you begin. JBoss Portal provides it's latest distribution included in JBoss Application Server. All of the guesswork has been eliminated so that you can unzip and run Portal with a few clicks. Get the latest here (ensure you choose the JBoss Portal + JBoss AS link) Next, all that's left is to download the JBoss Portlet Bridge distribution and cofigure your portlet to use the bridge. Or, you can run a provided archetype and deploy the generated war in a few easy steps. This will also give you an empty project to play around with or start from scratch. For system requirements and setting up your JBoss Portal environment see the reference guide.
Maven Archetypes The JBPB project utilizes Maven archetypes which allow you get up and running with different flavors of the bridge quickly. Available Archetypes Archetype Command JSF 1.2 Basic mvn archetype:generate -DarchetypeGroupId=org.jboss.portletbridge.archetypes -DarchetypeArtifactId=1.2-basic -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=org.whatever.project -DartifactId=myprojectname -DarchetypeRepository=http://repository.jboss.org/maven2/ RichFaces Basic mvn archetype:generate -DarchetypeGroupId=org.jboss.portletbridge.archetypes -DarchetypeArtifactId=richfaces-basic -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=org.whatever.project -DartifactId=myprojectname -DarchetypeRepository=http://repository.jboss.org/maven2/ Seam Basic (Modular EAR) mvn archetype:generate -DarchetypeGroupId=org.jboss.portletbridge.archetypes -DarchetypeArtifactId=seam-basic -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=org.whatever.project -DartifactId=seamproject -DarchetypeRepository=http://repository.jboss.org/maven2/
Running the Examples JSF 1.2 Basic, RichFaces Basic, Seam Basic, and other demos Each example application is configured to download the latest versions of JBoss Portal bundled with JBoss Application Server. After running the archetype or downloading the source code for the example application that you're interested in, you can run one of the following Maven profiles to save time and get everything up and running with only 2 commands. JBoss Portal 2.7.0.GA + JBoss AS 4.2.2 (Bundled) For more commands, view the README.txt in each project. Time Saving Tips If you plan on using the cargo profiles to do active development, you can save alot of time by not downloading the bundle each time you do a clean install. To use a locally configured server bundled with portal, use the following command line parameters. The variable for JBOSS_HOME_DIR is related to how you zip the server directory. If you zip the files under JBOSS_HOME/* then it will only be the name of your archive. But if you zip the actual folder JBOSS_HOME then JBOSS_HOME_DIR must be defined as 'zip file name/JBOSS_HOME folder name'. JBoss Portal 2.7.0.GA PortletContainer 2.0