Hi,
This is for passing string messages from one portlet to another.
public void messageReceived(MessageEvent event) throws PortletException {
PortletMessage message = event.getMessage();
if (message instanceof DefaultPortletMessage) {
String msgText = ((DefaultPortletMessage) message).getMessage();
event.getRequest().setAttribute("IsAnyMessage", msgText);
System.out.println("Inside MessageReceived, message = " + msgText);}
}
you can more details from the link below:
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0402_konduru/0402_konduru.html