> -----Original Message----- > From: Jason Novotny [mailto:jdnovotny@;lbl.gov] > Sent: Wednesday, October 30, 2002 9:02 PM > To: Jetspeed Developers List > Cc: [EMAIL PROTECTED] > Subject: Re: why do portlets inherit from servlets? > > > > Hi David, > > Thanks for the information. In trying to implement > something similar > myself, I'm confused as to how to manage the portlet lifecycle if > portlets are servlets. For instance, the only method a "manger" > servlet, or portlet container, can access of a portlet is the service > method thru the RequestDispatcher.include call. How would the > init(PortletConfig) or initConcrete(PortletSettings), login and other > methods get called? > In the other case, where portlets are their own objects and not > necessarily servlets, then what about the PortletConfig object, which > seems to get its params from the web.xml? Will that be a part of the > standard?
Well wouldn't the servlet interface be just one of the interfaces that a portlet may implement, so the container can make standardized calls such as init on the Portlet (extended) interface. IMO, there are too many differences between a portlet and servlet. The servlet api should be mimicked where needed. I personally wouldn't extend a Portlet interface from Servlet. A portlet has a different lifecycle and request phases. Some Servlet API methods would be not applicable (or stale) on the Portlet api. Portlets render fragments, servlets the entire page. David -- To unsubscribe, e-mail: <mailto:jetspeed-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:jetspeed-dev-help@;jakarta.apache.org>
