|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Case Study Developing a Service Information Portal on the WebLogic Platform
Moving to Java Portlets on WebLogic Portal
By: Eric Peterson
Aug. 8, 2005 12:00 PM
Moving to Java Portlets and BEA's Portal Server
The first part of the project involved migrating a SIP module to a Java Portlet. Luckily, the Portlet API and Servlet API are very similar in their use of request and response objects. This simplified the move, since all of the modules were Servlets. Much of the code could remain, with minimal refactoring. One of the major differences the team encountered was the use of the PortletURLs and render parameters. By using servlets, SIP 3 could get the entire HTTP request and response, and send any parameters back and forth through Web pages. SIP 3 uses a common coding practice, which involves passing a module ID parameter to help identify a request for a certain module configuration. When a module ID is encountered during a drill down, the SIP portal server displays only the requested module in a maximized window. The SIP portal server had no support for drilling down into two modules at the same time within the same browser. The following JSP snippet is similar to what is found in SIP 3:
<a href="portal?service=<%=serviceID%>&moduleID=<%=moduleID%>"> In the world of portlets for SIP 4, PortletURLs help pass the correct parameters to the correct portlet. A portal server must be able to determine which portlet should receive which parameters and ensure that the portlets retrieve the correct parameters. Using the aforementioned technique would not work; parameter passing needed to be redone. This problem is especially evident when testing in other portal servers, which are free to encode portlet parameters in any way they wish. Changes were made in the SIP portlet code, the display, or both. The following technique corrects this problem of parameter passing:
PortletURL drillDownURL = response.createRenderURL(); In addition, the following is updated in the JSP: <a href="<%= drillDownURL.toString()%>">naviagation link</a> The SIP product predated some of the Web development tools and technologies used today, and the work described above to correct URL parameter passing was a common task during migration. However, by transferring URL handling into the Portlet API, some additional options were made available. Previously, a drill down in modules would only display the content of a single module. Using the Portlet APIs, the team can drill down and navigate in multiple portlets simultaneously. This can be especially handy when SIP is used to diagnose IT issues, which commonly requires access to a few different spots to obtain the full picture.
Translating Portal Views
Supporting Data Filtering Moving data filtering into portlet preferences allows far fewer portlets to serve a larger audience of users. In fact, this is true with all portlet preferences. SIP 3 uses module configurations within a view file as shown in Listing 1. If one user prefers a different module view, SIP 3 requires a different role, portal view, and set of module configurations. In contrast, portlet preferences allow any number of users to customize their own personal preferences from a single portlet configuration. Therefore, hundreds or thousands of module configurations used in SIP 3 can now equal a handful of portlet configurations.
Authentication and Authorization YOUR FEEDBACK
BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||