tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karen E. Lee" <karen...@nersp.nerdc.ufl.edu>
Subject Re: DB connection tag question
Date Fri, 17 Aug 2001 18:53:08 GMT
I am trying to write a little extension to the dbtags tablib which reads a password from a
properties file instead of directly from the body of the jsp.  At this point out of frustration
I have simplified it down to:

---------------------------------------
package edu.ufl.osg.dbtags.connection;

import java.io.*;
import java.util.*;
import javax.naming.*;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.tagext.BodyTagSupport;
import org.apache.taglibs.dbtags.connection.*;

public class PropFileTag extends BodyTagSupport {
    
   public int doEndTag() throws JspTagException{
	try { 
	    ConnectionTag connTag = (ConnectionTag) findAncestorWithClass(this, 
               Class.forName("org.apache.taglibs.dbtags.connection.ConnectionTag"));
	    connTag.setPassword("myPassword");
	}
	
	catch (Exception e) {
	    e.printStackTrace();
	}

	return EVAL_PAGE;
  }
}
----------------------------------------

This is still returning a null password exception:
   java.lang.IllegalArgumentException: null password with user:karenlee
      at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:472)

If I abandon my propfiletag and just use <DBTags:password> it works fine.  Any idea
what's going on? Thanks.



-- 
Karen Lee
Open Systems Group
Northeast Regional Data Center
University of Florida
karenlee@nersp.nerdc.ufl.edu


Mime
View raw message