CLASSPATH taglib ver. 1.1

    Custom JSP taglib lets you deal with CLASSPATH settings and loaded packages. For example:

The following code lists all the elements in CLASSPATH:
 


<%@ taglib uri="taglib.tld" prefix="cl" %>

<cl:forEachInClassPath>
  <br><%=jarName%>
</cl:forEachInClassPath>

The following code lists all the loaded packages:
 


<%@ taglib uri="taglib.tld" prefix="cl" %>

<cl:forEachLoaded>
  <br><%=packageName%>
</cl:forEachLoaded>

You can check out CLASSPATH or loaded packages too:
 


<%@ taglib uri="taglib.tld" prefix="cl" %>

<cl:isLoaded name ="java.text">
  package java.text exists
</cl:isLoaded>

 


<%@ taglib uri="taglib.tld" prefix="cl" %>

<cl:isInClassPath name ="commons-lang.jar">
  commons-lang.jar exists
</cl:isInClassPath>

Tags are:

forEachInClassPath

Body tag executes own body for the each element in CLASSPATH. Nested variable jarName (type is java.lang.String) describes a current name. Parameters are: none

forEachLoaded

Body tag executes own body for the each loaded package. Nested variable packageName (type is java.lang.String) describes a current name. Parameters are: none

isInClassPath

Body tag executes own body in case of the given element exists in CLASSPATH. Parameters are:

1) name Describes a name for your element.

isNotInClassPath

Body tag executes own body in case of the given element does not exist in CLASSPATH. Parameters are:

1) name Describes a name for your element.

isLoaded

Body tag executes own body in case of the given package is loaded. Parameters are:

1) name Describes a name for your package.

isNotLoaded

Body tag executes own body in case of the given package does not exist. Parameters are:

1) name Describes a name for your package.
 

for downloading:

 Library: classtag.jar     Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.