This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes JSR168 Portlet User-Attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JSR168 Portlet User-Attributes" Watch "JSR168 Portlet User-Attributes" New topic

JSR168 Portlet User-Attributes

Damian Harvey

Joined: Aug 02, 2001
Posts: 12
I'm not sure if this is the right forum for this. If not could someone point me elsewhere.

I have an issue with a JSR168 Portlet that has 3 attributes defined in the <user-attribute> section of the Portlet.xml. I can't find any information on how to set these values.

Can anyone help me out with this?


Mike Farnham
Ranch Hand

Joined: Sep 25, 2001
Posts: 76

If they are defined in as Initial Parameters, then you can get them using the getInitParameter() method.

static String LIST_PAGE = "ListPage";
String page = getInitParameter(LIST_PAGE);

portlet.xml excerpt
< !-- example of an init parameter<br /> init parameters should be used if there is configuration<br /> used by ALL instances of the portlet on your server <br /> it should not be used for instance-level parameters<br /> -->



I agree. Here's the link:
subject: JSR168 Portlet User-Attributes
It's not a secret anymore!