From: Jon M. <jo...@te...> - 2006-03-23 14:02:55
|
Peter Crowther wrote: >>From: Jon Maber >>It is a servlet in the sense that it is invoked, gets >>information from a >>request object and outputs HTML via a response object. The >>only unusual >>feature is that it never outputs a whole page of HTML and is >>only used to insert output in the output of another servlet. >> >> > >I'd call it a portlet. Are we starting to reinvent JSR168 here? > > - Peter > > Portlets solve a problem which is much more tricky than Alistair's application. You have a page that contains multiple forms and links which have been output by different modules. You want the action property of every form to reference the same page that contains the form so that just one corner of the page reacts to the user input. None of the modules that are used to build the page knows about the others. Nearly all of this could be implemented using one JSP page and a Servlet for each module. However the form IDs, input field IDs and links could clash with those of the other servlets. Basically a Portlet is a Servlet which is happy for its form output tags to be rewritten and its form input to be transformed. To do this it needs to add HTML elements and attributes to its output according to rules. Jon |