On Wed, 2 May 2001, Brent Johnson wrote:

> The statement tag gets its connection as follows inside of doStartTag():
> Connection conn = (Connection)pageContext.getAttribute(_connId);
> 
> This means that the connection must be defined at PAGE_SCOPE.  This seems a bit 
>restrictive.  What if my connection isn't at page scope?  Is there a reason why the 
>statement tag doesn't use pageContext.findAttribute()? 

The <sql:connection> tags doesn't support assigning to another scope, so
that's the only real logic there.  I suppose it could use findAttribute,
but I don't really dig on people storing Connections at other
scopes.  That's what database pools are for.  :)

- Morgan

Reply via email to