tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject RE: Stored procedure (RFI proposal)
Date Mon, 14 Jul 2003 16:08:55 GMT

I do exactly the same thing [though I have multiple JSP controllers]. You
still maintain good MVC, without the assumption that Model-2 is some kind
of gospel we must believe in.

I used the sql-taglib of the JSTL and it worked relatively well. Some
issues with choosing DataSources dynamically.

Hen

On Mon, 14 Jul 2003, Chen, Gin wrote:

> One instance it makes sense is if you use a JSP for your controller.
> A JSP compiles into a Servlet anyways so sometimes it makes it easier to
> write a JSP that is nothing more than  controller functionality (no display)
> then to write and configure a Servlet.
> I know that the SQL taglib saved me HUGE amounts of time on a small project
> that I worked on just because of the fact that I used it this way.
>
> -Tim
>
> -----Original Message-----
> From: Martin van Dijken [mailto:mvdijken@madocke.nl]
> Sent: Monday, July 14, 2003 6:02 AM
> To: Tag Libraries Users List
> Subject: RE: Stored procedure (RFI proposal)
>
>
> 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.
>
> 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
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message