Foren

Where "portlet-class" is uses which always defined in web.xml ?

thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

Where "portlet-class" is uses which always defined in web.xml ?

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
Hi All,

As per my knowledge of servlet.

Webcontainer(tomcat) always look first on respective portlet's web.xml file.

I have gone through web.xml and i observe two things
1) Inside servlet class for all portlet controller class is PortletServlet. - I am clear about this
2) but inside the init-param uses "my controller" class name which i have mentioned in portlet.xml as below at the time of development of portlet.

<servlet>
<servlet-name>PortletName Servlet</servlet-name>
<servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-class</param-name>
<param-value>com.my.controller.myController</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

This means web.xml has settle config parameter.
My Questions are
1) Where this config parameter uses ? I try to find it but did not get any smooth way to understand flow from scratch.
2) and also i have gone through PortletServlet i could not find any doGet() or doPost method emoticon

Can any one throw some light on this ?

Help would be really appreciated.

Thanks,
Sagar Vyas
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Where "portlet-class" is uses which always defined in web.xml ?

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
PortletServlet acts as a proxy servlet class to make resources, etc., available for your portlet. It will proxy incoming requests through to your controller mentioned in the init param for the servlet.
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Where "portlet-class" is uses which always defined in web.xml ?

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
Thanks David For reply !

I will go through it and let you know if i have some doubt on this.

Thanks again.