(Exchange Programme to advance e-Infrastructure Know-How) The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Portlet Develop Riccardo Rotondo (riccardo.rotondo@garr.it) Consortium GARR Joint CHAIN/EUMEDGRID-Support/EPIKH School to Science Gateways Amman, Jordan 28.11.2011 www.epikh.eu
Outline Portlet Introduction; Porlet Life Cycle; Porlet Method Interface; Action Request Render Request
What is Porltet ? Defined in the Java Specification Request (JSR 168/286) A porlet is a web component able to set a frame portion of a web page. Differently from Servlet it needs a Porltlet Container to allow the user to interact with it. Standard Porltet can be deployed in any Porlet Container in case they will use standard libray.
Porlet Life Cycle YES NO End of Services?
Porltlet Interface Method Class GenericPortlets { init (PortletConfig); processAction (ActionRequest, ActionResponse); render (RenderRequest, RenderResponse); destroy(); doView (Request, Response); doEdit (Reuqest, Response); doHelp (Request, Response); }
Portlet Mode A porltet works in three different states. View Mode: generate a markup ( a portion of a web page); Edit Mode: allow portlet customisation and setting preferences. Help Mode: explains portlet functionalities.
Action Request Action Request Render Request view.jsp edit.jsp processAction() doView() Action Request Render Request edit.jsp doEdit() view.jsp processAction()
Render Request Render Request view.jsp view2.jsp doView()