Laliwala IT Services

Laliwala IT Services
Website Development

Tuesday, February 22, 2011

public void serveResource() is from which class, developer liferay, tutorial java liferay, alfresco developer

yan paing : Hi Everyone,

I would like to know the method

public void serveResource(

ResourceRequest req, ResourceResponse res)

throws PortletException, IOException {

}








is from which class in liferay.








Thanks and Regards,

Yan Paing






Mazhar Anwar : Hi Yan,








serveResource method is not in liferay classes but in Portlet API.

Portlet API Version 2.0 has introduced a new URL type, resource URLs. Resource URLs trigger the lifecycle method, serveResource, on the ResourceServingPortlet interface that you can leverage to create dynamic resources directly in the portlet.











For more Info, Please check out following links,








http://www.ibm.com/developerworks/websphere/library/techarticles/0803_hepper/0803_hepper.html








AND








http://www.bluesunrise.com/portlet-api/javax/portlet/ResourceServingPortlet.html








Regards,

Mazhar

No comments:

Post a Comment