It's better to remove all database knowledge from you JSPs entirely.
Personally I wouldn't give tags any knowledge about the database either.
There would be a separate layer (some people insist on using beans, but I avoid this too) the would know about the database. You delegate to it to load the required data from the parameters you provide it, then it returns objects which you use in your
JSP, tags and beans to provide presentation.
Dave