my dog learned polymorphism
The moose likes Portals and Portlets and the fly likes RAD and Portal Test Envoirmnemnt -Unable to Run a simple Portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "RAD and Portal Test Envoirmnemnt -Unable to Run a simple Portlet" Watch "RAD and Portal Test Envoirmnemnt -Unable to Run a simple Portlet" New topic

RAD and Portal Test Envoirmnemnt -Unable to Run a simple Portlet

Sushma Bhat

Joined: Jun 12, 2006
Posts: 7
Hello I am trying my hand at writing Portlets using the RAD and Portal Test Envoirnment.I am following the instructions given on the RedBook.But Unfortunately I am unable to run a very simple portlet on the Portal Test envoirnment.I am encountering a error when I am trying to run it ...This is the message(on the portal screen) I get when I click on the Portlet

"This portlet is unavailable. If the problem persists, please contact the portal administrator"

Is there something which I should do to get the portlet working
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

Hey dude. Welcome to the world of Portal and IRAD.

Sometimes if you dont' set the response header, you're in for a world of hurt:


I'd say there was something wrong with your portlet. If the environment says it can't find anything to deploy, it usually means the environment is good, but going from IRAD to the environment is the problem.

Take a look at my tutorial on creating JSR-168 Portlets with IRAD. It might give you an idea.

Regardless, I'd keep the first portlet real simple. Just code the doView method and printout HelloWorld.

Oh, one other thing. Sometimes the portal test environment coughs up a lung when Hot Method Replace is enabled. As a last ditch effort, I'd disable that, but that's a real low probability idea.

Here's a simple Portlet that should run. Copy and paste my doView:

package com.examscam.portlets;


import javax.portlet.*;

public class HelloWorldPortlet extends GenericPortlet {

protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {


PrintWriter out = response.getWriter();
out.print("Hello Cruel World!!!");


out.println("We love people who speak: ");



out.println("<B>These headers were sent to the server:</B><BR/><BR/> ");

java.util.Enumeration enum = request.getPropertyNames();
while (enum.hasMoreElements()) {

String name = enum.nextElement().toString();
String value = request.getProperty(name);
out.print(name + ": " + value);
I agree. Here's the link:
subject: RAD and Portal Test Envoirmnemnt -Unable to Run a simple Portlet
It's not a secret anymore!