Ok, I'd let the bean or someone far from the presentation do the dbaccess. I guess the tag is for that cases that direct presentation-bd access is right (simple and non-scalable apps, apps for explicitly working with dbs, examples or workarounds).

At 09:54 12/05/2004 -0400, you wrote:
It's to populate a drop down menu, so it is "presentation" related.

Karl

-----Original Message-----
From: Helios Alonso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 5:25 PM
To: Tag Libraries Users List
Subject: Re: sql tag


In the second choice what did you mean? (sorry my english skills)


a) servlet (post some data) and redirect to a JSP for some other choice
b) JSP use a servlet or some kind of component

Any case, it has to do with what is the arquitecture of your solution.  You
know, if you are building a nice layered system it's no good to use ANY sql
stuff at visual level (JSP).  But, if DB access is ok on your JSP, great.

If you meant (a) then you are propossing that JSP receives the values to
offer from the servlet... hmm.. I'd choose that only if you are using JSP
as an utilitary template, not as a visual representation of some portion of
the problem domain.  If it does represent something meaning, it's better to
encapsulate the logic in the JSP, or some internal component (again the
layer thing), not distributing the clients the resposability (the client is
the referrer servlet).

Summary:
a) template JSP, a referrer gives the values
b) monolitic system/JSP, JSP obtains the values with a sql
c) layered system, JSP queries a component with the logic encapsulated

Hope it helps!
Helios

At 16:52 11/05/2004 -0400, you wrote:
>What is the general consensus on the sql tag? I want to fill a drop down
>with values from a table in a database. Is it better to use the sql tag in
>the jsp or do it in the servlet the jsp is called from? Or is in 6 of one,
>half-dozen of the other?
>
>Thanks,
>Karl
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to