1 package net.simya.ldap.taglib; 2 3 import javax.servlet.jsp.tagext.*; 4 import javax.servlet.jsp.*; 5 import javax.naming.NamingException ; 6 import javax.naming.directory.Attribute ; 7 import net.simya.ldap.beans.*; 8 import net.simya.ldap.servlet.*; 9 10 public class GetDN 11 extends TagSupport 12 { 13 public int doStartTag() 14 throws JspException 15 { 16 Query queryTag = (Query) getParent(); 17 if ( queryTag == null ) 18 throw new JspTagException( "<GetDN> tag should be child node of <Query> tag." ); 19 20 JspWriter out = pageContext.getOut(); 21 try 22 { 23 String dn = queryTag.getDN(); 24 out.print( dn ); 25 26 } catch ( java.io.IOException ex ) 27 { 28 throw new JspTagException( "IO Error" ); 29 } 30 return EVAL_BODY_INCLUDE; 31 } 32 33 } | Popular Tags |