Total Pageviews

Thursday, July 21, 2011

Tabs in Portlets

Hi all,
Making tabs in Liferay portlet is quite easy. We can make it with very limited code.
I'm giving an example of tabs in a struts portlet. (I hope you can make one, and if not then please refer to my old posts for the same)

1. Write the following code in the jsp of portlet, you wish to make tabs. I'm making it in view.jsp
2. Now make three jsp files with the names 'about.jsp', 'siteMap.jsp' and 'contactUs.jsp'. These are the jsp files that get included in case of the respective tabs.

3. Make the following entry in struts-config.xml
4. finally, add following in tiles-defs.xml
This is all for making tabs in portlet. Hope this will help.


  1. This works fine when I have to display text using tabs..
    But do u have any idea on how to display portlets when clicking on tabs..

    Or How to include portlet in a portlet?


  2. You need to import that portlet in JSP.