Sunday, December 30, 2007

Create a new portlet in tDar

In order to add one new portlet in the tDar portal. Some basic procedures are required to follow:
  1. Create a class which inherits from "org.gridlab.gridsphere.provider.event.jsr.ActionFormEvent";
    1. It's better to create a separated project for the new porlet; in the project, we have
      1. a directory 'src'
      2. a directory 'webapp', under which some important configuration files are, like portlet.xml, layout.xml.
      3. build.properties
      4. build.xml: configurations about the compiling, deployment etc. (probably manual changes are required)
  2. Make relative configurations
    1. webapp/WEB-INF/portlet.xml:
      1. description information about the portlet class
    2. conf/gridsphere/layout.xml
      1. description information about the portlet class
    3. build.xml:
      1. add the build information about the new portlet
  3. Run 'ant deploy', and restart tomcat.

A good idea might be to create a code template for a new porlet.

No comments: