JSP Tabs Taglib

Written by coregps on May 18th, 2005 in Java.

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

The Ditchnet JSP Tabs Taglib provides an incredibly simple toolkit for adding rich, sophisticated tabbed-pane GUI components to web-based user interfaces. The Tabs Taglib combines the powerful features of DHTML, Java, and JSP to allow you to create web-based tabbed interfaces that behave in a manner remarkably similar to what you would expect from a rich client toolkit like Java Swing.

It is very easy to this Tablib. First,  Make sure that the JSTL is in your web app’s classpath. This means having jstl.jar and standard.jar on your web app’s classpath. And then download the Ditchnet JSP Tabs Taglib JAR file and put the JAR file into the WEB-INF/lib directory of your web application. Now we can use it like following:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
        “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<%@ page contentType=”text/html” %>
<%@ taglib prefix=”tab” uri=”http://ditchnet.org/jsp-tabs-taglib” %>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>

 
<head>
    <tab:tabConfig />
</head>
 
<body>
 
 
<tab:tabContainer id=”data-collect-container”>

 <tab:tabPane id=”computer” tabTitle=”Computer”>
      // some form fields here for computer
 </tab:tabPane>

 <tab:tabPane id=”software” tabTitle=”Software”>
      // some form fields here for software
 </tab:tabPane>

</tab:tabContainer>
 
</body> 
 
</html>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • De.lirio.us
  • feedmelinks
  • Furl
  • LinkaGoGo
  • scuttle
  • Shadows
  • Smarking
  • Reddit
  • Spurl
  • YahooMyWeb
  • connotea
  • Technorati
  • Netvouz
  • Fark
  • DZone
  • Netscape
  • Simpy
  • NewsVine
  • Slashdot

9 Responses to “JSP Tabs Taglib”

  1. armstrong Says:

    hi!
    i have down jsp_tabs_taglib lib,but there is no tab display,replace multi rows.r u run demo?

  2. esurfer Says:

    I didn’t run the demo. Make sure you’ve finished the following steps:
    1. Put JSTL (jstl.jar and standard.jsr) into your web application’s WEB-INF/lib directory.
    2. Put jsp tabs taglib jar file into your web application’s WEB-INF/lib directory.
    3. Restart Tomcat.
    4. Use jsp tabs taglib like what I’ve posted.
    If you can not work it out again. You can paste your code here or send me a mail. I can help you out.

  3. armstrong Says:

    hi!glad to heard about your response.i paste my code under here:
    1.code
    ———————————————
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
    “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

    <%@ page contentType=”text/html” %>
    <%@ taglib prefix=”tab” uri=”http://ditchnet.org/jsp-tabs-taglib” %>

    <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>

    <head>

    <tab:tabConfig />
    </head>
    <body>
    <tab:tabContainer id=”data-collect-container”>
    <tab:tabPane id=”computer” tabTitle=”Computer”>
    this is computer domain.
    </tab:tabPane>

    <tab:tabPane id=”software” tabTitle=”Software”>
    this is software domain.
    </tab:tabPane>

    </tab:tabContainer>
    </body>
    </html>

    2.in my WEB-INF/lib,all files is list here:

    ———————————————
    commons-beanutils-1.6.1.jar
    commons-collections-2.1.jar
    commons-digester-1.5.jar
    commons-lang-2.0.jar
    commons-logging-1.0.3.jar
    ditchnet-tabs-taglib.jar
    hsqldb-1.7.1.jar
    jstl-1.0.6.jar
    log4j-1.2.8.jar
    standard-1.0.6.jar
    struts-1.2.2.jar

    thx very much!

  4. esurfer Says:

    I’ve created a demo application for you which can be downloaded at http://www.jroller.com/resources/coreteam/tabs.war. Depoly it in your tomcat environment. If you have any trouble again, you can contact me.
    BTW, my environment is: Windows 2000 Server, Tomcat 5.5.7 and JDK 1.5.

  5. esurfer Says:

    And it seems that there are no errors in your code.

  6. ustczxf Says:

    maybe because of jstl.jar version,I changed it,success now

  7. Indhu Says:

    Is it possible to get the Tld - “jsp-tabs-taglib”

  8. zarty Says:

    I am trying the JSP Tabs Taglib but i dont seem to getting the dir neccessary for it to work though my root folder is not write protected.
    Is there a way to get the folder named org.ditchnet.taglib with the necessary CSS, JavaScript, and image resources from the JAR?
    Ihave added the extra jars mentioned by amstrong
    my WEB-INF/lib,all files is list here
    commons-beanutils-1.6.1.jar
    commons-collections-2.1.jar
    commons-digester-1.5.jar
    commons-lang-2.0.jar
    commons-logging-1.0.3.jar
    ditchnet-tabs-taglib.jar
    hsqldb-1.7.1.jar
    jstl-1.0.6.jar
    log4j-1.2.8.jar
    standard-1.0.6.jar
    struts-1.2.2.jar

    Are there any other suggestions?

    Thank you Zissis

  9. Deep_Ocean Says:

    Hello Sir,
    I have downloaded both standard-1.0.6 & jstl-1.0.6 jar files. I have set the path of them in class-path of the system (in User variables). After that I have paste above code in a jsp. but still i can’t see the Tab_Pane. What else i do need ???

    Please Help me !!!
    Thank you in advance

Leave a Reply



Site Navigation