JBoss.orgCommunity Documentation

JBoss Portal 2.7.1

Quickstart User Guide

Chris DeLashmutt

January 2009

JBoss Portal - Overview
1. Tutorial Forward
2. Installation
2.1. Downloading and Installing
2.2. Starting JBoss Portal
3. Portal Terminology
4. Interaction with the Portal
4.1. Window States
4.2. User Creation
4.3. Administrator Login
4.4. Content Management
4.5. Portal Management
5. Deploying Portlets
6. Tutorial End

Many IT organizations look to achieve a competitive advantage for the enterprise by improving business productivity and reducing costs. Today's top enterprises are realizing this goal by deploying enterprise portals within their IT infrastructure. Enterprise portals simplify access to information by providing a single source of interaction with corporate information. Although today's packaged portal frameworks help enterprises launch portals more quickly, only JBoss® Portal can deliver the benefits of a zero-cost open source license, combined with a flexible and scalable underlying platform.

JBoss Portal provides an open source and standards-based environment for hosting and serving a portal's Web interface, publishing and managing its content, and customizing its experience. It is entirely standards-based, and supports the JSR-168 Portlet Specification (Portlet 1.0) and JSR-286 Portlet Specification (Portlet 2.0) , which allows you to easily plug-in standards-compliant portlets to meet your specific portal needs. JBoss Portal is available through the business-friendly LGPL open source license, and the JBoss Enterprise Portal Plarform is supported by JBoss Enterprise Middleware Professional Support and Consulting. JBoss support services are available to assist you in designing, developing, deploying, and ultimately managing your portal environment. JBoss Portal is currently developed by JBoss Enterprise Middleware developers, and community contributors.

The JBoss Portal framework and architecture include the portal container, and support a wide range of features, including standard portlets, single sign-on, clustering, and internationalization. Portal themes and layouts are configurable. Fine-grained security administration -- down to portlet permissions -- rounds out the security model.

JBoss Portal Resources:

The JBoss Portal team encourages you to use this guide to install and configure JBoss Portal. If you encounter any configuration issues or simply want to take part in our community, we would love to hear from you in our forums.

Welcome to the JBoss Portal Quickstart tutorial. In this tutorial, you will:

Before we get started, a couple of notes about this tutorial:

  • For those that are not familiar with portals or portlets, please start with this article on portals: http://java.sys-con.com/read/131819.htm
  • This guide is not intended to show all of the features of JBoss Portal. The intention is to show how to use the basic functionality of JBoss Portal. There is also a user guide and reference guide that will assist you with further use of JBoss Portal.
  • This guide was created with JBoss Portal 2.6.2. This guide is expected to be forward compatible with future versions of Portal (although the screenshots may vary slightly).
  • JBoss Portal is platform independent, but this guide was developed using a Linux-based platform. This guide should work equally well for Unix/Linux/Windows installations because JBoss Portal is 100% Pure Java. Obviously, you may need use the run.bat instead of run.sh and use forward slashes instead of backslashes, etc.

The JBoss Portal bundle contains everything needed to execute JBoss Portal with the exception of Java itself. The JBoss Application Server in the JBoss Portal bundle requires either JDK 1.5 or JDK 1.4. If you do not have one of these on the machine that JBoss Portal will be running on, please download it here: http://java.sun.com/javase/downloads/index_jdk5.jsp. Once you have Java installed, you are ready to download the JBoss Portal bundle. The following link has the list of downloads for JBoss Portal: http://labs.jboss.com/portal/jbossportal/download. Download the "JBoss Portal + JBoss AS" bundle by clicking the "Download" link on the right of the page. From here, you will need to unzip it to your machine (Note: If you do not have a ZIP utility, please go to this link to get it: http://sourceforge.net/projects/sevenzip). Once you have unzipped it, you should have a directory structure with the following folders under, jboss-portal-2.6.2-GA:

  • bin - Contains the startup/shutdown commands for the JBoss Portal
  • client - Contains client libraries
  • docs - Contains documentation for the JBoss Portal
  • lib - Contains libraries
  • server - Contains JBoss Application Server configuration and the jboss-portal.sar file in the "deploy" directory

JBoss Portal is made up of portals, portal containers, portal pages, and portlets. What are these things? Here are some definitions:

Now let's look at that default portal page again with these terms in mind (Figure 4).

Now we see that the default portal we are looking at has five portal pages, and the default portal page has three portlets on it (greetings, user, and content view). In addition, we see that each portlet window is made up of decorations/controls and a portlet fragment (the content view does not have any decoration/controls). Each portlet can represent some fragment of information that you want to present to users. By having multiple portlets on a portal page, we can aggregate information from the portlets into a single browser window.

Now that we are logged in, there is a portal page available for the content management and portal administration. Click on the "Admin" link, and then on the "CMS" tab. The CMS Admin portal page displays (Figure 11).

The content management portlet allows users to create/delete files and folders, edit text/HTML files, and batch upload files. These files are then viewable through the content view portlet. HTML files can refer to other HTML files through the directory structure in the CMS. Different groups or departments in an organization can have their own area (directory structure) for the files/HTML pages they want to share on the Portal. Let's batch upload a set of HTML pages with images and style sheets. Mouse-over the "Select Action" dropdown menu, and click on the upload archive link. The upload archive view shows (Figure 12).

You can choose the destination folder for the upload by selecting a folder from the tree control on the left side of the portlet. Then you can select the language of the files being uploaded from the drop down list. Finally, click "Browse" to find the file you want to upload (Figure 13).

Figure 13. Choose file to batch upload.

Click on the quickstart.zip that you downloaded earlier (see note above) and select "Open". Finally, click the "Upload" button. The quickstart.zip file will be uploaded, extracted into the content repository, and the files and directories will now appear in the content management structure (see the new "quickstart" directory in Figure 14). This process may take a minute.

Figure 14. New quickstart directory shows in content management repository.

Click on the quickstart link to see the HTML files and sub-directories that were uploaded (Figure 15). Click on the "Home" link from the breadcrumbs at the top of the portlet to return to the top directory of the content manager repository (back to Figure 14).

Figure 15. HTML files and sub-directories that were uploaded into quickstart directory shows in content management repository.

Let's edit the default page to contain a link to our new pages. Clicking on the default link, we can see two directories, as well as three HTML files (Figure 16).

Figure 16. Default directory listing.

Click on the index.html link. The file browser will show the versions of this file (Figure 17).

Figure 17. Version view for index.html.

To edit this HTML file, click on the "text/html" link. The WYSIWYG editor view will appear (Figures 18). Click on the maximize icon in the upper right corner of the WYSIWYG editor if needed to make the editor portlet take up the entire page. Note: The WYSIWYG editor is dependent on browser. Some browsers show a box to enter HTML.

Figure 18. Content editor view.

HTML pages can be edited through this view. Let's change this page to point to our uploaded pages. Change the section title next to the PortletSwap table cell from "Project Information" to "Quickstart Guide" and change the text following the heading to be "Click here to see the Quickstart guide for JBoss Portal.". The updated text is in Figure 19.

Figure 19. Updated text in HTML page.

Now let's create the link that will point to the index.html page in the quickstart directory. Select the "Click here" text under Portal Documentation, then on the edit link button (it looks like a chain). The insert/edit link window appears. Change the Link URL to "quickstart/index.html" (Figure 20).

Figure 20. Insert/edit link window with updated link URL

Click "Insert" button to create the link. Then click "Create" button at the bottom of the portlet window to create the new version of the HTML file. The CMS Administration view shows again with the new 1.1 version shown (Figure 21). The check icon next to the version number shows this is the live version.

Figure 21. File browser with new version of index.html.

Click on the "Portal" link in the upper right corner of the browser page to see the changes we have made. The content view portlet shows the updated version of the index.html page we edited above (Figure 22).

Figure 22. Content view portlet with the updated default page.

Click on the "Click here" link that was updated to go to the new uploaded content (Figure 23).

Figure 23. Content view portlet with docs page shown.

The links on the quickstart HTML page that you uploaded will go to the other pages that were uploaded to the content repository with it. Try them out to see for yourself.

Click on the Admin link in the upper right of the browser page. From this Admin Portal, you should have access to the CMS, Members, WSRP and Portal management interfaces. (Figure 24).

Click the "Members" tab to access the member management page. Click on the "Search users" link to see all of the users currently enrolled in the portal security repository (Figure 25).

The starter user we created is shown in the list. Click on the "Roles" link next to the starter user to see the available roles (Figure 26).

Add the "Administrators" role to this user by checking the check box next to the "Administrators" label. Click the "Submit" button to apply the new role to the user. This brings us back to the main User Management view (Figure 27).

Now let's look at the user profile for the starter user. Click on "Search Users" again to get back to the user result list, and then click on the "Edit user" link next to the starter user. The user profile view appears (Figure 28).

This shows all of the fields available in the user profile. Under the "Personal Information" section, enter the first name of "Starter" and click the "Submit" button at the bottom of the page. The user list is redisplayed with the updated first name for the "starter" user (Figure 29).

Now, let's explore the management portlet, by clicking on the "Home" tab. This portlet shows a view of the portals, portal pages and portlet instances (Figure 30).

Let's create a new portal page. Click on the "default" portal link in the "Portals" list at the bottom of the page. In the resulting view, enter "Starter" in the text field next to the "Create a page named:" label. Your portal page view should match the following figure (Figure 31).

Click the "Create Page" button to create the new page. We now see the "Starter" page in the list of portal pages (Figure 32).

Now let's add some portlet instances to the portal page. Click on "Page layout" link of the "Starter" entry in the Management Portlet, and the details for that portal page are shown (Figure 33).

First, let's add a weather portlet. It's a good idea to give the new portlet window a name instead of relying on the portal to generate one for you, so enter "weather" in the "Window Name" field. The weather portlet is a JSR-168 portlet, so we can leave the "Content Type" drop-down set to "portlet". In the list labeled "Portlet instance associated to this window:", select the "WeatherPortletInstance" portlet instance. You can verify that you have the proper portlet instance selected by viewing the details that show up below the Portlet Instance list at the bottom of the portlet (Figure 34).

Scroll up to the list box that is labeled "center Region". Click the "Add" button to the left of that list box. The "weather" portlet instance is now shown under the "center Region" (Figure 35).

Let's change the theme for the weather portlet window we just added so that the weather portlet window doesn't display any decorations. Just below the "Portal Objects" tab near the top of the page is a breadcrumbs list that shows us we are in the "Portals" management section, in the "default" portal, and in the "Starter" page layout. Each of the elements in the breadcrumbs list is a link that will allow you to navigate back to other portal components. Click on the "Starter page" link in the breadcrumbs. In the resulting view under the "Manage windows within Starter page" section, click on the "theme" action link next to the "weather" window. Let's set the Window Renderer, Decoration Renderer, and Portlet Renderer to "emptyRenderer" (Figure 36).

Click the "Update" button to apply the theme changes. Finally, let's take a look at security in the Management Portlet. Click on the "Starter page" link in the breadcrumbs below the "Portal Objects" tab. Next click the "Security" link just under the "Manage Starter page" section title, and the list of available roles and actions is shown for the "Starter" portal page.(Figure 37).

Let's take a look at the Starter portal page we created. Click on the "Portal" link, and then the "Starter" tab at the top to go to the "Starter" portal page (Figure 38).

Let's add a portlet from Portletswap to the JBoss Portal we have running. Open a browser to the following URL: http://www.portletswap.com (Figure 39).

Figure 39. Portletswap website

Click on the "Browse Portlets" link to see the categories of portlets available (Figure 40).

Figure 40. Portlet categories on portletswap.

Click on the Miscellaneous Portlets browse link to see a list of portlets (Figure 41).

Figure 41. List of portlets on portletswap.

Click on the "Zip" link below the description for the Flash Portlet. The download dialog will appear (Figure 42).

Figure 42. Download dialog.

This ZIP file contains both the binary and the source for the portlet. Open the zip and extract the flash.war file. Place this file in the $JBOSS_HOME/server/default/deploy directory. The console for the JBoss Portal will show the portlet being deployed (Figure 43).

Figure 43. Flash Portlet deployed.

To see the deployed portlet, we need to add it to our Starter portal page. First, we need to create an instance of the portlet. Go to the Management Portlet and click "Portlet Definitions" tab (Figure 44).

Figure 44. Admin portal page.

A list of all portlets will be displayed. Click on the "Create Instance" action link for the "Flash Portlet". This will bring up a view similar to Figure 45 that will allow you to name the new portlet instance.

Figure 45. Portlets admininstration.

Type in "Flash Portlet" as the instance name in the textbox at the bottom of the page, and click on the "Create Instance" button. The resulting view will show the summary information about the "Flash Portlet" portlet instance that we created. (Figure 46).

Figure 46. Portlet instances summary.

Now you can add this portlet instance to the Starter portal page. Click on the "Portal Objects" tab and navigate to the "Page layout" page of "Starter" portal page as we did in the last section. Select "Flash Portlet" from the portlet list, click the "Select" button, and add it to center of the "Starter" portal page with a name of "flash" (Figure 47).

Figure 47. Starter portal page with "flash" portlet added.

Click on the "Portal" link in the upper right of the page. Click on the Starter portal page, and the "flash" portlet is displayed (Figure 48).

Figure 48. Starter portal page with "flash" portlet.

Congratulations! You have completed the JBoss Portal Quickstart Tutorial. During this tutorial, you:

Next steps: Next, take a look at the user guide for JBoss Portal. This will give you more information about using JBoss Portal. There is also a reference guide for developers using JBoss Portal. Both guides are accessible from our Documentation Page