Ecrire des portlets, c'est très simple. Télécharger et installer Pluto (implémentation de référence de la JSR 168)

Source de ce projet

cela donne:


créer un projet portletApp sous webapps

classpath du projet:

PLUTO_HOME/shared/lib/pluto-1.0.1-rc1.jar
PLUTO_HOME/shared/lib/portlet-api-1.0.jar
PLUTO_HOME/common/lib/servlet-api.jar
WEB-INF/classes

inclure la tld:

PLUTO_HOME/webapps/portletApp/WEB-INF/tldportlet.tld

code du portlet:


code de la jsp:


portlet.xml::


web.xml::


modifier PLUTO_HOME/webapps/pluto/WEB-INF/data/pageregistry.xml:


modifier PLUTO_HOME/webapps/pluto/WEB-INF/data/portletentityregistry.xml: