Total Pageviews

Wednesday, July 20, 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. Do you have a live demo page??

  2. 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?


  3. You need to import that portlet in JSP.


  4. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance the knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got a good knowledge.
    SEO Course in Chennai

  5. Wow...Excellent informative blog, really helpful. Thank you.

    Best CMA Training in hyd | ISFS