This post originated from an RSS feed registered with Java Buzz
by Nick Lothian.
Original Post: Spring Portlet Support
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Since there were no promising responses to my previous request for portlet frameworks I decided to do something about it myself.
I've submitted a patch to Spring 1.1 to enhance the spring portlet support so it will allow the use of the Spring Tag Libraries. It isn't (yet) as extensible as the web framework, but it is a good starting point (I think).
There isn't much in the way of documentation for it yet, but I did port the MVC tutorial code to the portlet framework.
Some notes:
The portlet version of the application leverages the concept of view and edit portlet modes. The view mode allows the user to view the current prices, while the edit mode allows the user to increase the prices.
The code in the bus package is identical to the Web version.
This JSP pages are almost identical to the Web versions, with the following exceptions:
The Portlet tag library is included as a jsp page directive in the JSP pages.
If the various Portals properly exposed the taglib themselves this would not be required.
The link from the view.jsp page to priceincrease is a portlet:renderURL tag
The form in priceincrease.jsp has to submit to the a URL defined by a portlet:actionURL tag
The code in the controller package is specific to the Portlet version.
The ultimate version of this would allow the reuse of JSP views in both the Portlet and Web frameworks.
I'm hopeful that it will incorporated into Spring and people will find it useful.