1 / 20

Portals and portlets

Portals and portlets. Sean C. Sullivan October 24, 2006 Portland Java Users Group. Overview. Portals Portal servers Java Portlets Portlet programming Portlet deployment Demo. What is a portal?.

Télécharger la présentation

Portals and portlets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Portals and portlets Sean C. Sullivan October 24, 2006 Portland Java Users Group

  2. Overview • Portals • Portal servers • Java Portlets • Portlet programming • Portlet deployment • Demo

  3. What is a portal? A portal is a web based application that [...] provides personalization, authentication, content aggregation from different sources and hosts the presentation layer of information systems source: Java Portlet 2.0 specification

  4. Liferay JBoss Portal Apache JetSpeed 2 Apache Pluto eXo platform uPortal IBM Websphere Portal BEA WebLogic Portal Sun Portal Server Oracle Portal Portal servers

  5. Portal server features • personalization • single sign-on • security: users, groups, roles • portlet admin: deploy, undeploy • page layout • pre-built portlets

  6. Liferay portal demo • http://demo.liferay.net/

  7. Portlet fragments The content generated by a portlet is also called a fragment. A fragment is a piece of markup (e.g. HTML, XHTML, WML) adhering to certain rules and can be aggregated with other fragments to form a complete document. The content of a portlet is normally aggregated with the content of other portlets to form the portal page. source: Java Portlet 2.0 specification

  8. Java Portlet specifications • Portlet 1.0 • JSR-168 • Portlet 2.0 • JSR-286

  9. Java Portlet API • javax.portlet.Portlet • javax.portlet.GenericPortlet • javax.portlet.ActionRequest • javax.portlet.ActionResponse • javax.portlet.RenderRequest • javax.portlet.RenderResponse

  10. javax.portlet.Portlet • public void destroy() • public void init(PortletConfig cfg) • public void processAction(ActionRequest, ActionResponse) • public void render(RenderRequest, RenderResponse)

  11. javax.portlet.GenericPortlet • protected void doView(...) • protected void doEdit(...) • protected void doHelp(...) • protected void processAction(...)

  12. Hello World Portlet public class HelloWorldPortlet extends javax.portlet.GenericPortlet { public void doView(RenderRequest req, RenderResponse resp) { resp.setContentType("text/html"); PrintWriter w = resp.getWriter(); w.println("Hello world"); } }

  13. JBoss Portal demo • http://portal.demo.jboss.com/

  14. Portlet requests • Action requests • Render requests

  15. Portlet modes javax.portlet.PortletMode • EDIT • VIEW • HELP

  16. Portlet window states javax.portlet.WindowState • MAXIMIZED • MINIMIZED • NORMAL

  17. Portlet deployment • WAR • web.xml • portlet.xml

  18. What's new in Java Portlet 2.0? • Resource serving • Events • Portlet filters • alignment with WSRP 2.0

  19. Additional topics • Caching • CSS • Internationalization • File upload • Inter-portlet communication • Wrapping existing applications • WSRP

  20. Resources • http://wiki.java.net/bin/view/Javapedia/Portal • http://wiki.java.net/bin/view/Javapedia/Portlet • http://www.jcp.org/en/jsr/detail?id=168 • http://www.jcp.org/en/jsr/detail?id=286

More Related