KonaKart Logo Jetspeed JSR 168 portlet
Search
As you can read in this article :

Portlets are Web-based components managed by portlet containers that supply dynamic content. Portals employ portlets as pluggable user-interface components—a presentation layer—for information systems. The Java Portlet Specification achieves interoperability among portlets and portals by defining the APIs for portlets and by standardizing the rules for preferences, user data, portlet requests and responses, deployment, packaging, and security. Java Portlet Specification 1.0, Java Specification Request (JSR) 168, was released in October 2003.

In the pre-JSR 168 days, you had to develop and maintain a separate version of your portlet that complied with the vendor-specific portlet API for each and every vendor portal. The related tasks were time-consuming, aggravating, and cumbersome. Moreover, to the detriment of the end users, ISVs, developers, and vendors, that scenario meant that only a limited number of applications were available through only a few portals.

JSR 168 brought a world of a difference: By adhering to the standards, you can build portlets that can run in portals, irrespective of their vendors. Hence, no more hassles with the requirements that vary according to vendors. That’s a win-win situation for all.

We have developed a version of KonaKart that adheres to the JSR 168 Portlet standard. A demonstration of KKPortlet is available, where we run KonaKart in a portlet within Jetspeed-2 Enterprise Portal


Online demo of the KonaKart Portlet


You can view KonaKart running as a portlet in JetSpeed on our online demo of KonaKart in a portal server.  If you have registered a KonaKart user on our demonstration system you can use these credentials (your email address and chosen password) to login in to KonaKart within the portal.   The portlet version shares a database with our non-portlet version so you will see the same data from the two clients.


How to create the portlet WAR file for jetspeed


In order to create a KonaKart portlet, you must first install KonaKart using the normal installation procedure and ensure that it is functioning correctly. The next step is to create a WAR file that can be installed within the portal server. In order to do this you must navigate to the KonaKart/custom directory and run the ant task called make_portlet_war .



C:\Program Files\KonaKart\custom>bin\ant make_portlet_war
Buildfile: build.xml

clean_portlet_war:
     [echo] Cleanup portlet WAR...
   [delete] C:\Program Files\KonaKart\custom\portlet_war not found.
     [echo] Cleanup portlet WARs staging area...
   [delete] C:\Program Files\KonaKart\custom\konakart_portlet\stage not found.

make_portlet_war:
    [mkdir] Created dir: C:\Program Files\KonaKart\custom\portlet_war
    [mkdir] Created dir: C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart
    [mkdir] Created dir: C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart\WEB-INF\jsp
     [echo] Lay out the WAR in the staging area
     [echo] Copy (almost) the whole konakart webapp to staging area
     [copy] Copying 354 files to C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart
     [copy] Copied 32 empty directories to 3 empty directories under C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart
     [echo] Copy the jars reqd for the portlet to staging area
     [copy] Copying 2 files to C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart\WEB-INF\lib
     [echo] Copy the config files reqd for the portlet to staging area
     [copy] Copying 4 files to C:\Program Files\KonaKart\custom\konakart_portlet\stage\konakart\WEB-INF
     [echo] Filter the JSPs to staging area for the portlet WAR
     [echo] Filter the web.xml to staging area for the portlet WAR
     [echo] Filter the struts-config.xml to staging area for the portlet WAR
     [echo] Create portlet konakart.war
      [war] Building war: C:\Program Files\KonaKart\custom\portlet_war\konakart.war

BUILD SUCCESSFUL
Total time: 10 seconds
C:\Program Files\KonaKart\custom>



A WAR file called konakart.war is created in the KonaKart/custom/portlet_war directory.

LIMITATIONS of konakart portlet


At the moment, the GWT based One Page Checkout code cannot be used for the portlet implementation. It is disabled automatically.

How to install the portlet on Jetspeed-2


The following instructions describe how  we installed  the WAR on Jetspeed-2.1.3 . The steps to follow will be different for other portals. While Jetspeed is down, perform the following steps:
  1. Place konakart.psml (found in KonaKart/custom/konakart_portlet/jetspeed) under webapps/jetspeed/WEB-INF/pages. This will create a KonaKart folder.
  2. The KonaKart style sheets have to be copied manually as follows:
    1. The style sheets should be copied from webapps/konakart/styles to  Jetspeed-2.1.3/webapps/jetspeed/decorations/layout/css/
    2. Copy the images used by the style sheets from webapps/konakart/images/styles to a new directory (which you must create) called Jetspeed-2.1.3/webapps/jetspeed/decorations/layout/images/styles
    3. Edit Jetspeed-2.1.3/webapps/jetspeed/decorations/layout/css/portal-standard.css to include skin_style.css. To do this, you must add the following line to the end of the file: @import url("./skin_style.css");
    4. Modify the include statement in skin_style.css to use the syntax: @import url("./tile3.css");
  3. Deploy KonaKart by putting the WAR into /Jetspeed-2.1.3/webapps/jetspeed/WEB-INF/deploy.
  4. Run Jetspeed. After logging in, you should see a KonaKart folder which contains the KonaKart application.

Here are some screen shots for the steps taken to install the style sheets:

Copy the style sheets
Copy Style Sheets 


Copy the style sheet images
Copy the style sheet images

Edit Jetspeed-2.1.3/webapps/jetspeed/decorations/layout/css/portal-standard.css to import the KonaKart Style sheet

Import the KonaKart style sheet

Edit skin_style.css
Edit skin_style.css