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");

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to