portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ate Douma <...@douma.nu>
Subject [J2] Major new version of the Struts Bridge: version 0.2 now available
Date Thu, 20 Jan 2005 02:49:32 GMT
I'm happy to bring the news of a major upgrade of the Struts Bridge.

A short summary of its new features:
- Based on the latest Struts-1.2.4

- Provides new struts-1.2.4-portlet-html.tld and struts-1.2.4-portlet-html-el.tld, as
   well as a new struts-portlet-el.tld.
   The first two tld files are full replacements for the struts-html and struts-html-el tlds.
   By using these tlds instead of the struts-portlet and struts-portlet-el tlds, migrating
   existing Struts applications becomes much easier (just change the taglib definition).
   Furthermore, there is now full struts-el support Bridge for all the tags (including the
   new onces).

- New Portlet supporting extended Struts tags ImgTag and ImageTag and largely extended
   LinkTag and RewriteTag.
   These tags now support relative image src paths and href link
   paths (including ../ elements).

- Provides transparent (non-code based) definition of request attribute values to be saved
   during ActionRequest handling which will be restored in the subsequent RenderRequest(s).

- Provides transparent (non-code based) definition of url (prefixes) which must be
   rendered as Action or Render PortletURL.
   This removes the need to specify the renderURL attribute for link and rewrite tags (its
   still supported though, and then will override).

- xml based configuration of above two features loaded at Portlet initialization.
   Default configuration file name: WEB-INF/struts-portlet-config.xml, but this is
   configurable itself as well.
   Example configuration (from the new JPetstore demo Portlet):
	<?xml version="1.0" encoding="UTF-8"?>
	    <attribute name="errors"/>
	    <attribute name="message"/>
	  <portlet-url-type default="render">
	    <action path="/shop/add"/>
	    <action path="/shop/switch"/>
	    <action path="/shop/remove"/>
	    <action path="/shop/signoff"/>
	    <action path="/shop/viewCategory"/>
	    <action path="/shop/viewItem"/>
	    <action path="/shop/viewProduct"/>
	    <action path="/shop/viewCart"/>
	    <action path="/shop/newOrder"/>
	    <render path="/shop/newOrderForm"/>
	    <action path="/shop/listOrders"/>

   Default PorletURL created by link and rewrite tag changed from ActionURL to RenderURL.

   This change is made because in the most cases this turned out to be RenderURLs.

   For migrating of existing Struts Bridge based Portlets to the new version there is an
   very simple configuration option to revert this to the old style:

   Define a WEB-INF/struts-portlet-config.xml containing (at least):
	<?xml version="1.0" encoding="UTF-8"?>
	  <portlet-url-type default="action"/>

   That'll switch the default back to the old style. For the old Struts MailReader Demo Portlet
   also provided with Jetspeed-2, I've put in a configuration file just like that.

- New demo portlet application: JPetstore Portlet.
   This very know example web application from iBatis (www.ibatis.com) is now also available
   Portlet and is automatically deployed in Jetspeed-2 as demo portlet: check it out.

- Deploy as Portlet or as web application!
   The Struts Bridge can now be used in a non-Portlet context, and then will simply fall back
   the basic Struts functionality.
   This allows the deployment of the same Portlet Application war as web application and as
   application. You can thus also test the application in a web server only (as long as you
   don't use Portlet features specifically).

   Try out the JPetstore Portlet demo and access it as Portlet from within Jetspeed-2 or
   directly from the webserver (e.g. http://localhost:8080/jpetstore).

- Abstracted the access to the ServletContextProvider with protected methods in StrutsPortlet
   allowing Portal Vendor specific extensions to be used (like VAP).

- Still no real documentation ;-)
   I'm working on it and plan to deliver real usage documentation, as well as a tutorial and
   for migrating existing Struts applications, within a week.

Regards, Ate Douma

To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org

View raw message