Custom JSP taglib. Lets you perform basic JNDI operations. For example:
<%@ taglib uri="taglib.tld" prefix="jndi" %> <jndi:Context id="ctx"> <jndi:setProperty name="java.naming.factory.initial"> com.evermind.server.ApplicationClientInitialContextFactory </jndi:setProperty> <jndi:setProperty name="java.naming.security.principal">admin</jndi:setProperty> </jndi:Context> <jndi:lookup contextId="ctx" id="factory" name="java:comp/env/jms/theTopicConnectionFactory"/> Some components from Coldtags suite (like JMS and EJB taglibs) use this taglib. Tags are: Context Body tag. Obtains an initial context and saves obtained value in the page scope variable. Body (could be empty) lets you define environment (see setProperty tag). Parameters are: 1) id Describes a name for the variable with the obtained context
setProperty Body tag you may use within Context tag. Body defines a property for your environment. Parameters are: 1) name name for the property lookup Retrieves the named object and saves obtained value. In case of errors tag sets saved value to null. Parameters are: 1) contextId Defines a name for context variable
lookupSuccess Body tag. Retrieves the named object and saves obtained value. In case of errors tag sets saved value to null and skips body. Otherwise body will be executed. Parameters are: 1) contextId Defines a name for context variable
lookupFailure Body tag. Retrieves the named object and saves obtained value. In case of errors tag sets saved value to null and executes body. Otherwise (no errors) body will be skipped. Parameters are: 1) contextId Defines a name for context variable
forEachBinding Body tag. Executes own body for each binding in the given context. Within tag's body you may use nested variables currentName, currentClass and currentObject as a reference to the current element. Parameters are: 1) contextId Defines a name for context variable
for downloading: Library: jnditag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|