Monday, November 14, 2011

Difference between PortletConfig.getInitParameter() and PortletContext.getInitParameter()

  • Context initialization parameters are defined in the web.xml file. They share the same context space as Servlets and JSPs belonging to the same application and we can get them using PortletContext.getInitParameter() method.
  • Portlet-wide initialization parameters are defined in the portlet.xml file and we can get them using PortletConfig.getInitParameter() method.

Enjoy coding :-)

No comments: