tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mitchell <jmitch...@apache.org>
Subject Re: Stored procedure (RFI proposal)
Date Mon, 14 Jul 2003 18:28:36 GMT
On Monday 14 July 2003 06:01, Martin van Dijken wrote:
> Agreed,
>
> I think it a horrific thing to do data manipulation in a JSP tag in the
> first place. Personally I think the whole SQL-taglib is something that
> never should have been invented in the first place.

I used to agree with that statement "whole-heartedly".  I don't anymore.  
Mostly because the sql tablibs are only one of the few "steppping stones" to 
getting more people involved on the Java side of the fence (for those used to 
doing things in an asp way).  

Not everyone has the opportunity for their company to re-train their 
development dept on the J2EE platform.  I was fortunate enough to be in that 
category (for a little while anyway).  Although I was also fortunate enough 
to be on a team that had enough foresite to choose Struts (pre 1.0 days).


>
> Martin
>
> > -----Original Message-----
> > From: Vic Cekvenich [mailto:vic_cekvenich@baseBeans.com]
> > Sent: zaterdag 12 juli 2003 1:21
> > To: taglibs-user@jakarta.apache.org
> > Subject: Re: Stored procedure (RFI proposal)
> >
> >
> > Of course... data access in a presentation view is bad practice, much
> > better to unit test a bean (with DAO, such as iBatis.com) in
> > an MVC way.
> > Then you can reuse you bean for Soap, etc., not just JSP and
> > keep your
> > JSP code clean.
> >
> > Michael Duffy wrote:
> > >Do you mean you want to batch commands, the way the
> > >java.sql.Statement.addBatch allows you to?  That would
> > >be useful to lots of people, I'll bet.  I think that
> > >would require tag changes, too.
> > >
> > >I can see a <sql:batch> tag that could have multiple
> > ><sql:update> children.  Do they do such a thing in
> > >Jakarta's DBTags taglib? - MOD
> > >
> > >--- James Smith <jksmith@email.arizona.edu> wrote:
> > >>I was actually dealing with a similar problem
> > >>yesterday; I wanted to write a
> > >>tag that called not a stored procedure, but several
> > >>SQL statements in a row,
> > >>using a dataSource, just like I would use for
> > >><sql:xxxx> tags.  After
> > >>looking through the source code, I noticed that the
> > >>abstract classes
> > >
> > >org.apache.taglibs.standard.tag.common.sql.QueryTagSupport
> > >
> > >>and
> > >
> > >org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport
> > >
> > >>both used the
> > >>exact same code to access a data source.  So, I was
> > >>wondering if in future
> > >>versions of the tag library, we could have an
> > >>abstract tag that extended
> > >>BodyTagSupport and did all the work of getting the
> > >>dataSource and database
> > >>connection, and then QueryTagSupport and
> > >>UpdateTagSupport (I didn't look at
> > >>TransactionTagSupport that closely, but I'm assuming
> > >>it does something
> > >>similar) could inherit from that class, as could any
> > >>other tags that would,
> > >>say, call multiple SQL statements or call a stored
> > >>proc using a JSTL
> > >>dataSource.  Since I haven't looked at the source
> > >>code for the standard
> > >>taglibs under Tomcat 5-alpha, I don't know if this
> > >>idea would still be
> > >>compatible with the newer code, but if it is, I
> > >>think it would be useful.
> > >>Just an idea!  Thanks,
> > >>
> > >>James Smith
> > >>Application Systems Analyst, Treistman Center
> > >>College of Fine Arts, University of Arizona
> > >>
> > >>----- Original Message -----
> > >>From: "Michael Duffy" <duffymo@yahoo.com>
> > >>To: "Tag Libraries Users List"
> > >><taglibs-user@jakarta.apache.org>
> > >>Sent: Wednesday, July 02, 2003 4:40 AM
> > >>Subject: Re: Stored procedure
> > >>
> > >>>Not if the underlying implementation isn't using
> > >>>CallableStatement.  Stored procs can have in, out,
> > >>
> > >>and
> > >>
> > >>>inout parameters.  They can also return multiple
> > >>>ResultSets.
> > >>>
> > >>>When I look at the java.sql.CallableStatement
> > >>>javadocs, it seems clear to me that it's a very
> > >>>different animal from Statement and
> > >>
> > >>PreparedStatement.
> > >>
> > >>> The taglibs that support it will look very
> > >>
> > >>different
> > >>
> > >>>from the JSTL sql taglib.  JMHO - MOD
> > >>>
> > >>>--- Daniel Montero <danim@soin.co.cr> wrote:
> > >>>>I believe you can just do something like
> > >>>><sql:query datasource="jdbc/myds" sql="exec
> > >>
> > >>my_proc"
> > >>
> > >>>>/>
> > >>>>
> > >>>>just like any other sql statement.
> > >>>>
> > >>>>
> > >>>>
> > >>>>----- Original Message -----
> > >>>>From: "Kevin Passey" <kpassey@kdpsoftware.co.uk>
> > >>>>To: "Taglibs (E-mail)"
> > >>>><taglibs-user@jakarta.apache.org>
> > >>>>Sent: Tuesday, July 01, 2003 9:40 AM
> > >>>>Subject: Stored procedure
> > >>>>
> > >>>>>Hi,
> > >>>>>
> > >>>>>Are there any taglibs which I can use to call
> > >>
> > >>a
> > >>
> > >>>>stored procedure.
> > >>>>
> > >>>>>Thanks
> > >>>>>
> > >>>>>Kevin
> > >
> > >---------------------------------------------------------------------
> > >
> > >>>>To unsubscribe, e-mail:
> > >>>>taglibs-user-unsubscribe@jakarta.apache.org
> > >>>>For additional commands, e-mail:
> > >>>>taglibs-user-help@jakarta.apache.org
> > >>>
> > >>>__________________________________
> > >>>Do you Yahoo!?
> > >>>SBC Yahoo! DSL - Now only $29.95 per month!
> > >>>http://sbc.yahoo.com
> > >
> > >---------------------------------------------------------------------
> > >
> > >>>To unsubscribe, e-mail:
> > >>
> > >>taglibs-user-unsubscribe@jakarta.apache.org
> > >>
> > >>>For additional commands, e-mail:
> > >>
> > >>taglibs-user-help@jakarta.apache.org
> > >
> > >---------------------------------------------------------------------
> > >
> > >>To unsubscribe, e-mail:
> > >>taglibs-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail:
> > >>taglibs-user-help@jakarta.apache.org
> > >
> > >__________________________________
> > >Do you Yahoo!?
> > >SBC Yahoo! DSL - Now only $29.95 per month!
> > >http://sbc.yahoo.com
> >
> > --
> > Vic Cekvenich,
> > Struts Instructor,
> > 1-800-917-JAVA
> >
> > Advanced <a href ="baseBeans.com">Struts Training</a> and
> > project recovery in North East.
> > Open Source <a href ="baseBeans.com">Content Management</a>
> > basicPortal sofware
> > Best practice<a href ="baseBeans.com">Struts Support</a>
> > v.1.1 helper ScafflodingXPress
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message