The portlet-name element defines the name of the portlet. Each portlet name should be unique within the portlet application (that is, within the portlet plugin). This is also referred within Liferay Portal as the portlet id.
The display-name type defines a short name that is displayed by tools. This is used by display-name elements. The display name need not be unique.
The portlet-class element defines the Fully Qualified Name (FQN) of the portlet class. .
The init-param element specifies a name/value pair as an initialization parameter of the portlet.
Expiration-cache defines expiration-based caching for this portlet. The parameter indicates the time in seconds after which the portlet output expires. -1 indicates that the output never expires.
The supports element contains the supported mime-type. Supports also indicates the portlet modes a portlet supports for a specific content type. All portlets must support the view mode.
Portlet-info defines portlet information.
The security-role-ref element defines the declaration of a security role reference in the code of the web application. In Liferay, the role-name defines which roles can access the portlet.
2- docroot/WEB-INF/liferay-portlet.xml - In this file we can define css, js files required for the portlet. We can also define whether a portlet is instanceable or not. Set the instanceable value to true if the portlet can appear multiple times on a page. If set to false, the portlet can only appear once on a page. The default value is false.
The default content of liferay-portlet.xml is as below: