Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Portals and portlets

Portals and portlets

Portals
Portal servers
Java Portlets
Portlet programming
Portlet deployment
Demo

Dang Nguyen

May 16, 2016
Tweet

More Decks by Dang Nguyen

Other Decks in Technology

Transcript

  1. Overview • Portals • Portal servers • Java Portlets •

    Portlet programming • Portlet deployment • Demo 16-May-16 2
  2. 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 16-May-16 3
  3. Portal servers • Liferay • JBoss Portal • Apache JetSpeed

    2 • Apache Pluto • eXo platform • uPortal • IBM Websphere Portal • BEA WebLogic Portal • Sun Portal Server • Oracle Portal 16-May-16 4
  4. Portal server features • personalization • single sign-on • security:

    users, groups, roles • portlet admin: deploy, undeploy • page layout • pre-built portlets 16-May-16 5
  5. 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 16-May-16 7
  6. Java Portlet API • javax.portlet.Portlet • javax.portlet.GenericPortlet • javax.portlet.ActionRequest •

    javax.portlet.ActionResponse • javax.portlet.RenderRequest • javax.portlet.RenderResponse 16-May-16 9
  7. javax.portlet.Portlet • public void destroy() • public void init(PortletConfig cfg)

    • public void processAction(ActionRequest, ActionResponse) • public void render(RenderRequest, RenderResponse) 16-May-16 10
  8. javax.portlet.GenericPortlet • protected void doView(...) • protected void doEdit(...) •

    protected void doHelp(...) • protected void processAction(...) 16-May-16 11
  9. 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"); } } 16-May-16 12
  10. What's new in Java Portlet 2.0? • Resource serving •

    Events • Portlet filters • alignment with WSRP 2.0 16-May-16 18
  11. Additional topics • Caching • CSS • Internationalization • File

    upload • Inter-portlet communication • Wrapping existing applications • WSRP 16-May-16 19