Hi,
could the following be used in setQuery of the PreparedStatementImpl of the
DBTags taglib library:
public void setQuery(String query) throws SQLException, JspTagException{
Connection conn = (Connection)pageContext.getAttribute(_connId);
//NE: added Exception call and the relevant throws for this method and
in interface StatementTag
if(conn == null) {
throw new JspTagException("There is no such connection
'"+_connId+"'");
}
_statement = conn.prepareStatement(query);
pageContext.setAttribute(getId(), _statement);
}
Otherwise I get a nasty null pointer.
Also please could the TLD be changed to allow more attributes to be dynamic,
I had to change my version to allow me to set a dynamic column value for
setColumn.
Many regards
Neil Ellis