How do Portlets (JSR168) access the display profile

I am developing a portlet that needs to specialised for each channel it is used in. Since the channel (via the display profile) can provide properties back to the provider I was wondering what the appropriate api would be to do the same from a portlet and whether there were any examples for a portlet ?

Alternatively, can people think of other ways of specialising the portlet for each channel it is used in ?

Thanks

[436 byte] By [Songmatt] at [2007-11-26 8:30:17]
# 1

Have a look at the PortletPreferences class (javax.portlet.PortletPreferences).

In one of my Creator apps, I used it this way from the application bean:

import javax.portlet.PortletPreferences;

import javax.portlet.PortletRequest;

...

PortletPreferences pr = ((PortletRequest)getExternalContext().getRequest()).getPreferences();

String uid = (String)pr.getValue("ApplicationId", "");

String password = (String)pr.getValue("Password", "");

knothec at 2007-7-6 21:50:24 > top of Java-index,Web & Directory Servers,Portal Servers...