JBoss.orgCommunity Documentation

Chapter 1. Getting started with JBoss Portlet Bridge

1.1. What's New in 2.0?
1.1.1. Eventing
1.1.2. Portlet Served Resources
1.1.3. Public Render Parameters
1.2. Bridge Frameworks and Extensions
1.2.1. Seam Bridgelets
1.2.2. RichFaces Bridgelets
1.3. Before you start
1.4. Maven Archetypes
1.4.1. Running the Examples (Optional)
1.5. Video Tutorials

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.

The JBoss Portlet Bridge currently supports JBoss Portal, GateIn, JSF 1.2, JBoss Seam, and JBoss Richfaces. There are configurations that apply to supporting each framework. See section Chapter 2, Bridge Configuration for instructions.

The JBoss Portlet Bridge project is also actively developing extensions, and to differentiate from just another "project" that has boring ol' "extensions" we coined the term "Bridgelets" - because what would a project with Java and JSF be without having "*let" on the end of it? Not very cool in my opinion ;) With that said, in this current release we decided to bring all of our bridgelets into the impl code base since they are critical in most JSF portlet applications. Now it only takes a single line of configuration to utilize these features.

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 and GateIn provides it's latest distribution included in JBoss Application Server. All of the guesswork has been eliminated so that you can unzip and run the Portal with a few clicks. Get the latest here (ensure you choose the 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 Section 1.4, “Maven Archetypes” 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.

This project utilizes Maven archetypes which allow you get up and running with different flavors of the bridge quickly.


JSF 1.2 Basic, RichFaces Basic, Seam Basic, and other demos

The Maven-Cargo setup mentioned below is completely optional. It gives users who are new to the bridge or ones who may have problems running the bridge in their current setup, a completely fresh install of both JBoss AS and JBoss Portal to run against - with only a few commands. This setup only requires that the latest versions of Java and Maven be installed on your machine, and the following 3 commands will take care of the rest.

To see a step-by-step tutorial of this setup in action, follow along here:
                 Lesson 1: Getting Started With The Bridge

Each example application is configured to download the latest versions of JBoss Portal bundled with JBoss Application Server. After running the archetype Section 1.4, “Maven Archetypes” 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. You have 2 options for deploying the generated project using Maven. You can let the project download, run, and deploy JBoss AS and Portal automatically with the first option . Or you can use your own local install of JBoss AS and Portal to deploy this project with the second option.

JBoss Portal 2.7.2.GA + JBoss AS 4.2.3 (Bundled download)


            1. mvn install -Plocal-portal cargo:start
            2. mvn cargo:deploy -Plocal-portal
            3. visit http://localhost:8080/portal
            
For more commands, view the README.txt in each project. 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'. So basically, just zip up your local install of JBoss AS and portal (or download the bundle from sourceforge) if you want to use this option.


            

JBoss Portal 2.7.2.GA + JBoss AS 4.2.3 (Downloaded and stored locally)


            1. mvn install cargo:start -Dlocal -Plocal-portal -DJBOSS_ZIP_HOME=/{path to zipped portal + JBoss AS}/jboss-portal-2.7.2-bundled.zip -DJBOSS_HOME_DIR=jboss-portal-2.7.2-bundled/jboss-portal-2.7.2
            2. mvn cargo:deploy -Plocal-portal
            3. visit http://localhost:8080/portal
            

Lesson 1: Getting Started With The Bridge

Lesson 2: Portlet 1.0 Advanced Seam and RichFaces

Lesson 3: Seam and Portlet 2.0 Eventing

Lesson 4: Running the 2.0 bridge on GateIn and deploy using JBoss Tools

Check here for the latest videos.