Portlets and the Portlet Harness on a Mercury system

How to write, deploy, and test them is a safe environment



Requirements:

  1. You have a working BFD Workspace referencing the current tools.
  2. You have setup a stable and working Mercury Installation.
  3. (A project with JSP and Action Java code ready for testing).
At a minimum, you need the first two. The last requirement is quite involved and is covered in depth by the Icecube Developers Guide.

The steps to deploy your portlets into the Portlet Harness are few and easy to repeat. It is the intention of DAQ to provide a minimal harness for portlets to run in. This is no frills interface that only displays one portlet at a time. An index of all portlets exposed in your portlet project is listed on the left side of the web-based harness.

  1. Activate your workspace. This just initializes some environment vairables used in building and deploying
  2.   $ source ./setup.sh (or .csh if you use tcsh)

  3. Move into your portlet project directory.
  4.   $ cd blah-display

    Where blah-display is your portlet project name.

  5. Build and deploy your portlets via a WAR file.
  6.   $ ant deploy.plt-app

    If the JBoss server is running locally on your machine, you can look at the console log and see the deployment of your WAR file. Assuming you have editted the portlet files properly, this deployment should not raise any errors. If you see any, contact someone who has done more deployments than you.

    Keep in mind that the act of this deployment ALSO DEPLOYS THE PORTLET HARNESS. You do not need to worry about the internals of the harness itself. The Ant target and the deployed WAR files bundles up everything needed.

  7. Visit the web URL and start testing.
  8. On a web browser running locally, you can use either your hostname or localhost for the URL.

    http://localhost:8080/blah-project

    Where blah-project is the name of the project. Not the name of the WAR file deployed.

  9. Edit,Bug Fix, etc... and redeploy

    At this point you can select each portlet and see what works and what doesn't. This will be an interative process to get the pages to do exactly what you want. Don't be discouraged!. In order to put your new portlet deployment into the harness, you simply need to redeploy the project with the same command as above.

      $ ant deploy.plt-app

    JBoss is smart enough to undeploy the old WAR for you before the new one is installed and deployed.