Re: Configuration for a portlet applicaiton
David Taylor <[email protected]>
| Newsgroups | gmane.comp.jakarta.jetspeed.user |
|---|---|
| Message-ID | <CAM4V2B6StFyy9nnmgHjzb7V+7Qp3Hks5+0N7BTtDU4JhZNxucA@mail.gmail.com> |
On Fri, Oct 14, 2011 at 2:08 AM, Mansour Al Akeel <[email protected]> wrote: > I understand that I can use init-param in a portlet to pass parameters, > but this has to be done for each portlet. I need to set a parameter > (configuration option) for the whole application. I mean the parameter > is to be shared by all portlets in the single application. > > I have looked at USER_INFO. Is there another way, to do it ? > Set an context param in your portlet app's web.xml <context-param> <param-name>configuration</param-name> <param-value>deployment</param-value> </context-param> and then access in your portlet String configuration = config.getPortletContext().getInitParameter("configuration");