You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lynn Guy <lg...@yahoo.com> on 2003/10/08 18:26:58 UTC

Re: Struts/SQL Server rephrased

Let's restate the question...
I'm new to struts and my database is SQL Server.  Can
someone point me in the correct direction where to
find out how to set up an environment that utilizes
these two to build an application?

--- David Graham <gr...@yahoo.com> wrote:
> 
> --- Jayson Falkner <ja...@jspinsider.com> wrote:
> > Hi Godfrey,
> > 
> > I can't think of any, but I'm positive you would
> get some pointers if
> > you asked the Struts user list. I'll send a copy
> this to the list.
> > 
> > Does anyone know of a good Struts tutorial that
> also deals with using
> > SQL Server?
> 
> They are completely unrelated topics.  Struts
> actions should never know
> where you're getting your data.
> 
> David
> 
> > 
> > 
> > Thanks,
> > 
> > Jayson Falkner
> > jayson@jspinsider.com
> > 
> > 
> > On Tue, 2003-10-07 at 15:10, godfrey@riis.com
> wrote:
> > > Hey Jayson,
> > > 
> > > Know any decent struts tutorials when using it
> > > on top of SQL Server? 
> > > 
> > > Hope all is well.
> > > 
> > > Thanks
> > > 
> > > Godfrey Nolan
> > > godfrey@riis.com
> > > 
> > > 
> > > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


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


Re: Struts/SQL Server rephrased

Posted by Bryce Fischer <br...@berzerker-soft.com>.
> Let's restate the question...
> I'm new to struts and my database is SQL Server.  Can
> someone point me in the correct direction where to
> find out how to set up an environment that utilizes
> these two to build an application?

You are missing one more component.. Your application server. Are you
using Tomcat? JBoss? Weblogic?

Basically, any Struts tutorial will help you on that side of the
equation.

For SQL Server, you'll need a JDBC Driver. After that, follow your
application server's instructions on setting up a datasource.

-- 
Bryce Fischer <br...@berzerker-soft.com>


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


Re: Struts/SQL Server rephrased

Posted by David Graham <gr...@yahoo.com>.
--- Lynn Guy <lg...@yahoo.com> wrote:
> Let's restate the question...
> I'm new to struts and my database is SQL Server.  Can
> someone point me in the correct direction where to
> find out how to set up an environment that utilizes
> these two to build an application?

For Struts related questions you're already in the right place :-).  It
shouldn't matter what database you're using so more generically you need
to know about how to write Java database code.  

The JDBC homepage is a good place to start:
http://java.sun.com/products/jdbc/

There are plenty of other online forums that address database specific
questions.

David

> 
> --- David Graham <gr...@yahoo.com> wrote:
> > 
> > --- Jayson Falkner <ja...@jspinsider.com> wrote:
> > > Hi Godfrey,
> > > 
> > > I can't think of any, but I'm positive you would
> > get some pointers if
> > > you asked the Struts user list. I'll send a copy
> > this to the list.
> > > 
> > > Does anyone know of a good Struts tutorial that
> > also deals with using
> > > SQL Server?
> > 
> > They are completely unrelated topics.  Struts
> > actions should never know
> > where you're getting your data.
> > 
> > David
> > 
> > > 
> > > 
> > > Thanks,
> > > 
> > > Jayson Falkner
> > > jayson@jspinsider.com
> > > 
> > > 
> > > On Tue, 2003-10-07 at 15:10, godfrey@riis.com
> > wrote:
> > > > Hey Jayson,
> > > > 
> > > > Know any decent struts tutorials when using it
> > > > on top of SQL Server? 
> > > > 
> > > > Hope all is well.
> > > > 
> > > > Thanks
> > > > 
> > > > Godfrey Nolan
> > > > godfrey@riis.com
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product
> > search
> > http://shopping.yahoo.com
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Re: Struts/SQL Server rephrased

Posted by Vic Cekvenich <ce...@baseBeans.com>.
Try ibatis.com db layer link, that could help put you in the right 
direction.
.V

Lynn Guy wrote:
> Actually, this was someone else's question but having
> just gone through it I was trying to get people to
> respond in a helpful manner.  I didnt mean to cloud
> the issue by using SQLServer specifically, any dbase
> would do.  I'm still in the process of filling in the
> holes for myself so this helps.  Hope it helps the
> original uhum.."poor sod".
> 
> thanks
> 
> --- Kirk Wylie <kw...@m7.com> wrote:
> 
>>Then maybe the approach should be to state what I
>>think everybody's 
>>trying to convey:
>>
>>1) You have to start with understanding how
>>SQLServer works within Java, 
>>in other words, learning JDBC.
>>2) You then have to understand how SQLServer works
>>in any type of web 
>>application (i.e. how you configure data sources in
>>a container 
>>environment). Your application server, no doubt, has
>>many different 
>>examples, though they may not explicitly give
>>SQLServer information (if 
>>you're worried, I've done this several times with
>>SQLServer with a 
>>variety of application servers).
>>3) Once you get to that point, you have to know
>>rough "best practices" 
>>for working with ANY database server in a Struts web
>>application. All 
>>the major Struts books cover this in some fashion.
>>
>>There's nothing that I think we on the list could
>>say about using 
>>SQLServer specifically with Struts, because the two
>>are orthogonal. I've 
>>written several Struts applications on top of
>>SQLServer, and nothing in 
>>the JSP pages or the Struts code actually knows that
>>it's working with 
>>SQLServer at all (but then again I'm using
>>Hibernate).
>>
>>Even if you (perish the thought... ;-) use SQL
>>directly from your 
>>Actions or JSP pages, Struts won't know about it.
>>You're in the realm of 
>>my #1 and #2 points: this is generic to using JDBC
>>in Web Applications 
>>(for the code) and SQLServer in Java (for the SQL
>>commands and driver 
>>trickiness).
>>
>>If you want any specific tips as to how _I_'ve done
>>it, I'll be happy to 
>>provide them, but in general, I think that if you've
>>read a good set of 
>>documentation on points #1-3 it'll be pretty self
>>evident how it works 
>>together, in that Struts really won't know anything
>>about SQLServer.
>>
>>Kirk Wylie
>>
>>Lynn Guy wrote:
>>
>>
>>>The issue is that the "poor sod" who doesnt know
>>
>>it
>>
>>>all coming in has 2 stovepipes.  Struts and
>>
>>SQLServer
>>
>>>(or some other db).  How does one get started when
>>
>>the
>>
>>>app requires data from a database? Maybe struts
>>>shouldnt know about the database, fine.  But
>>
>>struts is
>>
>>>in the mix so there must be an
>>>approach/mechanism/something that gets the data to
>>
>>the
>>
>>>page.  Its not magic so where is the discussion of
>>>approaches to maintaining struts "ignorance" of
>>
>>the db
>>
>>>while getting my organizationId from the db to the
>>>page?????
>>>
>>>So far I've got:
>>>  check out the datasource
>>>  check some sort of configuration in the
>>
>>webserver
>>
>>>  check out object-relational mapping
>>>  check out JDBC
>>>
>>>the rest is to my imagination and if I get it
>>
>>wrong
>>
>>>you all will be right there to point it out to me
>>>later why I shouldnt have done that! 
>>>
>>>sorry, but its a pain in the (&*&&%(& to learn and
>>
>>its
>>
>>>even harder when all the discussions ignore how
>>
>>the
>>
>>>pieces fit together because they arent supposed to
>>>know about each other!  Sounds like a catch22 to
>>
>>me.
>>
>>>--- David Graham <gr...@yahoo.com>
>>
>>wrote:
>>
>>> >
>>> > --- Mark Lowe <ma...@talk21.com> wrote:
>>> > >
>>> > > On Wednesday, October 8, 2003, at 07:30 PM,
>>
>>David
>>
>>> > Graham wrote:
>>> > >
>>> > > >
>>> > > > --- Mark Lowe <ma...@talk21.com> wrote:
>>> > > >> Godfrey
>>> > > >>
>>> > > >> I think what folks are trying to say is
>>
>>that
>>
>>> > the SQL stuff is
>>> > > separate
>>> > > >> to the struts stuff, and this is kind of
>>
>>what
>>
>>> > its about. There is a
>>> > > >> data source definition that confuses the
>>
>>hell
>>
>>> > out of people new to
>>> > > >> struts as it seems to implicitly suggest
>>
>>that
>>
>>> > it should be used.
>>> > > >>
>>> > > >> However most of the folks advise against
>>
>>its
>>
>>> > use as it encourages
>>> > > >> breaking with MVC.. That said, there are
>>> > examples in the
>>> > > documentation
>>> > > >> and if you're used to quick dirty SQL in
>>
>>html
>>
>>> > pages then using struts
>>> > > >> even when breaking MVC is still progress.
>>> > > >>
>>> > > >> You'll want some JDBC references and
>>
>>google
>>
>>> > will find you some.
>>> > > >>
>>> > > >> when you've got the hang of doing SQL
>>
>>(JDBC)
>>
>>> > stuff in your struts
>>> > > >> flavored webapp. I really dont know why
>>
>>folks
>>
>>> > get so snobby about
>>> > > >> people breaking with MVC to get started..
>>> > > >
>>> > > > I wouldn't describe the responses as
>>
>>"snobby".
>>
>>> > The question was
>>> > > > confusing
>>> > > > because Struts has nothing to do with SQL
>>
>>Server
>>
>>> > or database access in
>>> > > > general.  You can code JDBC in Struts
>>
>>actions
>>
>>> > just like a normal
>>> > > > Servlet
>>> > > > app.  There is no "Struts way" to do
>>
>>database
>>
>>> > access.
>>> > >
>>> > > I know that, you know that, some poor sod
>>
>>with
>>
>>> > SQLServer and obviously
>>> > > little java experience perhaps doesn't. The
>>> > datasource configuration in
>>> > > struts config does can lead to folks think
>>
>>there
>>
>>> > is..
>>> >
>>> > I agree, and that's one reason I think the
>>> > <data-source> configuration
>>> > should be deprecated and removed.  It served
>>
>>its
>>
>>> > purpose in the beginning
>>> > but now IMO Struts really has no business
>>
>>dealing
>>
>>> > with DataSources at all.
>>> >
>>> > David
>>> >
>>> > >
>>> > >
>>> > > >
>>> > > >> The funny thing is its the
>>> > > >> same folks recommending JSTL which have
>>
>>SQL as
>>
>>> > part of the lib.
>>> > > >
>>> > > > That's like saying you shouldn't use JSP
>>
>>because
>>
>>> > it lets you create
>>> > > > confusing scriptlets.  You don't have to
>>
>>use the
>>
>>> > JSTL's sql tags just
>>> > > > like
>>> > > > you don't have to use JSP scriptlets for
>>
>>them to
>>
>>> > both be good
>>> > > > technologies.
>>> > >
>>> > > I guess what I said could be read like that..
>>
>>But
>>
>>> > tags aren't the same
>>> > > as embedding java in your jsp's. At least you
>>
>>can
>>
>>> > port the java code
>>> > > out of jsp's,  and the java is still java.
>>
>>The
>>
>>> > stuff you learn using
>>> > > scriptlets is useful across the board and
>>
>>thus
>>
>>> > perhaps less of a waste
>>> > > of time. If you used SQL tags then what use
>>
>>is
>>
>>> > that? Where you going to
>>> > > go with them?
>>> > >
>>> > > So no sorry, its not like saying scriptlets
>>
>>are
>>
>>> > bad for this reason,
>>> > > its really quite different.
>>> > >
>>> > > Mark
>>> > >
>>> > > >
>>> > > > David
>>> > > >
>>> > > >>
>>> > > >> When you've done all that and you've seen
>>
>>what
>>
>>> > a pain it can be,
>>> > > >> you'll
>>> > > >> naturally arrive at the point where you'll
>>
>>hate
>>
>>> > SQL and be gagging
>>> > > for
>>> > > >> an object-relational bridge. But I'd worry
>>> > about this when you get
>>> > > >> here..
>>> > > >>
>>> > > >> Hope this helps
>>> > > >>
>>> > > >> Mark
>>> > > >>
>>> > > >> On Wednesday, October 8, 2003, at 05:26
>>
>>PM,
>>
>>> > Lynn Guy wrote:
>>> > > >>
>>> > > >>> Let's restate the question...
>>> > > >>> I'm new to struts and my database is SQL
>>> > Server.  Can
>>> > > >>> someone point me in the correct direction
>>> > where to
>>> > > >>> find out how to set up an environment
>>
>>that
>>
>>> > utilizes
>>> > > >>> these two to build an application?
>>> > > >>>
>>> > > >>> --- David Graham
>>
>><gr...@yahoo.com>
>>
>>> > wrote:
>>> > > >>>>
>>> > > >>>> --- Jayson Falkner
>>
>><ja...@jspinsider.com>
>>
>>> > wrote:
>>> > > >>>>> Hi Godfrey,
>>> > > >>>>>
>>> > > >>>>> I can't think of any, but I'm positive
>>
>>you
>>
>>> > would
>>> > > >>>> get some pointers if
>>> > > >>>>> you asked the Struts user list. I'll
>>
>>send a
>>
>>> > copy
>>> > > >>>> this to the list.
>>> > > >>>>>
>>> > > >>>>> Does anyone know of a good Struts
>>
>>tutorial
>>
>>> > that
>>> > > >>>> also deals with using
>>> > > >>>>> SQL Server?
>>> > > >>>>
>>> > > >>>> They are completely unrelated topics. 
>>
>>Struts
>>
>>> > > >>>> actions should never know
>>> > > >>>> where you're getting your data.
>>> > > >>>>
>>> > > >>>> David
>>> > > >>>>
>>> > > >>>>>
>>> > > >>>>>
>>> > > >>>>> Thanks,
>>> > > >>>>>
>>> > > >>>>> Jayson Falkner
>>> > > >>>>> jayson@jspinsider.com
>>> > > >>>>>
>>> > > >>>>>
>>> > > >>>>> On Tue, 2003-10-07 at 15:10,
>>> > godfrey@riis.com
>>> > > >>>> wrote:
>>> > > >>>>>> Hey Jayson,
>>> > > >>>>>>
>>> > > >>>>>> Know any decent struts tutorials when
>>
>>using
>>
>>> > it
>>> > > >>>>>> on top of SQL Server?
>>> > > >>>>>>
>>> > > >>>>>> Hope all is well.
>>> > > >>>>>>
>>> > > >>>>>> Thanks
>>> > > >>>>>>
>>> > > >>>>>> Godfrey Nolan
>>> > > >>>>>> godfrey@riis.com
>>> > > >>>>>>
>>> > > >>>>>>
>>> > > >>>>>>
>>> > > >>>>>
>>> > > >>>>>
>>> > > >>>>>
>>> > > >>>>
>>> > > >>>
>>> > >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > >>>>> To unsubscribe, e-mail:
>>> > > >>>>
>>
>>struts-user-unsubscribe@jakarta.apache.org
>>
>>> > > >>>>> For additional commands, e-mail:
>>> > > >>>> struts-user-help@jakarta.apache.org
>>> > > >>>>>
>>> > > >>>>
>>> > > >>>>
>>> > > >>>> __________________________________
>>> > > >>>> Do you Yahoo!?
>>> > > >>>> The New Yahoo! Shopping - with improved
>>> > product
>>> > > >>>> search
>>> > > >>>> http://shopping.yahoo.com
>>> > > >>>>
>>> > > >>>>
>>> > > >>>
>>> > >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > >>>> To unsubscribe, e-mail:
>>> > > >>>>
>>
>>struts-user-unsubscribe@jakarta.apache.org
>>
>>> > > >>>> For additional commands, e-mail:
>>> > > >>>> struts-user-help@jakarta.apache.org
>>> > > >>>>
>>> > > >>>
>>> > > >>>
>>> > > >>>
>>> > >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > >>> To unsubscribe, e-mail:
>>> > struts-user-unsubscribe@jakarta.apache.org
>>> > > >>> For additional commands, e-mail:
>>> > struts-user-help@jakarta.apache.org
>>> > > >>>
>>> > > >>
>>> > > >>
>>> > > >>
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > >> To unsubscribe, e-mail:
>>> > struts-user-unsubscribe@jakarta.apache.org
>>> > > >> For additional commands, e-mail:
>>> > struts-user-help@jakarta.apache.org
>>> > > >>
>>> > > >
>>> > > >
>>> > > > __________________________________
>>> > > > Do you Yahoo!?
>>> > > > The New Yahoo! Shopping - with improved
>>
>>product
>>
>>> > search
>>> > > > http://shopping.yahoo.com
>>> > > >
>>> > > >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > > To unsubscribe, e-mail:
>>> > struts-user-unsubscribe@jakarta.apache.org
>>> > > > For additional commands, e-mail:
>>> > struts-user-help@jakarta.apache.org
>>> > > >
>>> > >
>>> > >
>>> > >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > > To unsubscribe, e-mail:
>>> > struts-user-unsubscribe@jakarta.apache.org
>>> > > For additional commands, e-mail:
>>> > struts-user-help@jakarta.apache.org
>>> > >
>>> >
>>> >
>>> > __________________________________
>>> > Do you Yahoo!?
>>> > The New Yahoo! Shopping - with improved product
>>> > search
>>> > http://shopping.yahoo.com
>>> >
>>> >
>>>
> ---------------------------------------------------------------------
> 
>>> > To unsubscribe, e-mail:
>>> > struts-user-unsubscribe@jakarta.apache.org
>>> > For additional commands, e-mail:
>>> > struts-user-help@jakarta.apache.org
>>> >
>>>
>>>
>>>
> ---------------------------------------------------------------------
> 
>>>To unsubscribe, e-mail:
>>
>>struts-user-unsubscribe@jakarta.apache.org
>>
>>>For additional commands, e-mail:
>>
>>struts-user-help@jakarta.apache.org
>>
>>
>>
>>
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>struts-user-help@jakarta.apache.org
>>



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


Re: Struts/SQL Server rephrased

Posted by Lynn Guy <lg...@yahoo.com>.
Actually, this was someone else's question but having
just gone through it I was trying to get people to
respond in a helpful manner.  I didnt mean to cloud
the issue by using SQLServer specifically, any dbase
would do.  I'm still in the process of filling in the
holes for myself so this helps.  Hope it helps the
original uhum.."poor sod".

thanks

--- Kirk Wylie <kw...@m7.com> wrote:
> Then maybe the approach should be to state what I
> think everybody's 
> trying to convey:
> 
> 1) You have to start with understanding how
> SQLServer works within Java, 
> in other words, learning JDBC.
> 2) You then have to understand how SQLServer works
> in any type of web 
> application (i.e. how you configure data sources in
> a container 
> environment). Your application server, no doubt, has
> many different 
> examples, though they may not explicitly give
> SQLServer information (if 
> you're worried, I've done this several times with
> SQLServer with a 
> variety of application servers).
> 3) Once you get to that point, you have to know
> rough "best practices" 
> for working with ANY database server in a Struts web
> application. All 
> the major Struts books cover this in some fashion.
> 
> There's nothing that I think we on the list could
> say about using 
> SQLServer specifically with Struts, because the two
> are orthogonal. I've 
> written several Struts applications on top of
> SQLServer, and nothing in 
> the JSP pages or the Struts code actually knows that
> it's working with 
> SQLServer at all (but then again I'm using
> Hibernate).
> 
> Even if you (perish the thought... ;-) use SQL
> directly from your 
> Actions or JSP pages, Struts won't know about it.
> You're in the realm of 
> my #1 and #2 points: this is generic to using JDBC
> in Web Applications 
> (for the code) and SQLServer in Java (for the SQL
> commands and driver 
> trickiness).
> 
> If you want any specific tips as to how _I_'ve done
> it, I'll be happy to 
> provide them, but in general, I think that if you've
> read a good set of 
> documentation on points #1-3 it'll be pretty self
> evident how it works 
> together, in that Struts really won't know anything
> about SQLServer.
> 
> Kirk Wylie
> 
> Lynn Guy wrote:
> 
> > The issue is that the "poor sod" who doesnt know
> it
> > all coming in has 2 stovepipes.  Struts and
> SQLServer
> > (or some other db).  How does one get started when
> the
> > app requires data from a database? Maybe struts
> > shouldnt know about the database, fine.  But
> struts is
> > in the mix so there must be an
> > approach/mechanism/something that gets the data to
> the
> > page.  Its not magic so where is the discussion of
> > approaches to maintaining struts "ignorance" of
> the db
> > while getting my organizationId from the db to the
> > page?????
> > 
> > So far I've got:
> >   check out the datasource
> >   check some sort of configuration in the
> webserver
> >   check out object-relational mapping
> >   check out JDBC
> > 
> > the rest is to my imagination and if I get it
> wrong
> > you all will be right there to point it out to me
> > later why I shouldnt have done that! 
> > 
> > sorry, but its a pain in the (&*&&%(& to learn and
> its
> > even harder when all the discussions ignore how
> the
> > pieces fit together because they arent supposed to
> > know about each other!  Sounds like a catch22 to
> me.
> > 
> > --- David Graham <gr...@yahoo.com>
> wrote:
> >  >
> >  > --- Mark Lowe <ma...@talk21.com> wrote:
> >  > >
> >  > > On Wednesday, October 8, 2003, at 07:30 PM,
> David
> >  > Graham wrote:
> >  > >
> >  > > >
> >  > > > --- Mark Lowe <ma...@talk21.com> wrote:
> >  > > >> Godfrey
> >  > > >>
> >  > > >> I think what folks are trying to say is
> that
> >  > the SQL stuff is
> >  > > separate
> >  > > >> to the struts stuff, and this is kind of
> what
> >  > its about. There is a
> >  > > >> data source definition that confuses the
> hell
> >  > out of people new to
> >  > > >> struts as it seems to implicitly suggest
> that
> >  > it should be used.
> >  > > >>
> >  > > >> However most of the folks advise against
> its
> >  > use as it encourages
> >  > > >> breaking with MVC.. That said, there are
> >  > examples in the
> >  > > documentation
> >  > > >> and if you're used to quick dirty SQL in
> html
> >  > pages then using struts
> >  > > >> even when breaking MVC is still progress.
> >  > > >>
> >  > > >> You'll want some JDBC references and
> google
> >  > will find you some.
> >  > > >>
> >  > > >> when you've got the hang of doing SQL
> (JDBC)
> >  > stuff in your struts
> >  > > >> flavored webapp. I really dont know why
> folks
> >  > get so snobby about
> >  > > >> people breaking with MVC to get started..
> >  > > >
> >  > > > I wouldn't describe the responses as
> "snobby".
> >  > The question was
> >  > > > confusing
> >  > > > because Struts has nothing to do with SQL
> Server
> >  > or database access in
> >  > > > general.  You can code JDBC in Struts
> actions
> >  > just like a normal
> >  > > > Servlet
> >  > > > app.  There is no "Struts way" to do
> database
> >  > access.
> >  > >
> >  > > I know that, you know that, some poor sod
> with
> >  > SQLServer and obviously
> >  > > little java experience perhaps doesn't. The
> >  > datasource configuration in
> >  > > struts config does can lead to folks think
> there
> >  > is..
> >  >
> >  > I agree, and that's one reason I think the
> >  > <data-source> configuration
> >  > should be deprecated and removed.  It served
> its
> >  > purpose in the beginning
> >  > but now IMO Struts really has no business
> dealing
> >  > with DataSources at all.
> >  >
> >  > David
> >  >
> >  > >
> >  > >
> >  > > >
> >  > > >> The funny thing is its the
> >  > > >> same folks recommending JSTL which have
> SQL as
> >  > part of the lib.
> >  > > >
> >  > > > That's like saying you shouldn't use JSP
> because
> >  > it lets you create
> >  > > > confusing scriptlets.  You don't have to
> use the
> >  > JSTL's sql tags just
> >  > > > like
> >  > > > you don't have to use JSP scriptlets for
> them to
> >  > both be good
> >  > > > technologies.
> >  > >
> >  > > I guess what I said could be read like that..
> But
> >  > tags aren't the same
> >  > > as embedding java in your jsp's. At least you
> can
> >  > port the java code
> >  > > out of jsp's,  and the java is still java.
> The
> >  > stuff you learn using
> >  > > scriptlets is useful across the board and
> thus
> >  > perhaps less of a waste
> >  > > of time. If you used SQL tags then what use
> is
> >  > that? Where you going to
> >  > > go with them?
> >  > >
> >  > > So no sorry, its not like saying scriptlets
> are
> >  > bad for this reason,
> >  > > its really quite different.
> >  > >
> >  > > Mark
> >  > >
> >  > > >
> >  > > > David
> >  > > >
> >  > > >>
> >  > > >> When you've done all that and you've seen
> what
> >  > a pain it can be,
> >  > > >> you'll
> >  > > >> naturally arrive at the point where you'll
> hate
> >  > SQL and be gagging
> >  > > for
> >  > > >> an object-relational bridge. But I'd worry
> >  > about this when you get
> >  > > >> here..
> >  > > >>
> >  > > >> Hope this helps
> >  > > >>
> >  > > >> Mark
> >  > > >>
> >  > > >> On Wednesday, October 8, 2003, at 05:26
> PM,
> >  > Lynn Guy wrote:
> >  > > >>
> >  > > >>> Let's restate the question...
> >  > > >>> I'm new to struts and my database is SQL
> >  > Server.  Can
> >  > > >>> someone point me in the correct direction
> >  > where to
> >  > > >>> find out how to set up an environment
> that
> >  > utilizes
> >  > > >>> these two to build an application?
> >  > > >>>
> >  > > >>> --- David Graham
> <gr...@yahoo.com>
> >  > wrote:
> >  > > >>>>
> >  > > >>>> --- Jayson Falkner
> <ja...@jspinsider.com>
> >  > wrote:
> >  > > >>>>> Hi Godfrey,
> >  > > >>>>>
> >  > > >>>>> I can't think of any, but I'm positive
> you
> >  > would
> >  > > >>>> get some pointers if
> >  > > >>>>> you asked the Struts user list. I'll
> send a
> >  > copy
> >  > > >>>> this to the list.
> >  > > >>>>>
> >  > > >>>>> Does anyone know of a good Struts
> tutorial
> >  > that
> >  > > >>>> also deals with using
> >  > > >>>>> SQL Server?
> >  > > >>>>
> >  > > >>>> They are completely unrelated topics. 
> Struts
> >  > > >>>> actions should never know
> >  > > >>>> where you're getting your data.
> >  > > >>>>
> >  > > >>>> David
> >  > > >>>>
> >  > > >>>>>
> >  > > >>>>>
> >  > > >>>>> Thanks,
> >  > > >>>>>
> >  > > >>>>> Jayson Falkner
> >  > > >>>>> jayson@jspinsider.com
> >  > > >>>>>
> >  > > >>>>>
> >  > > >>>>> On Tue, 2003-10-07 at 15:10,
> >  > godfrey@riis.com
> >  > > >>>> wrote:
> >  > > >>>>>> Hey Jayson,
> >  > > >>>>>>
> >  > > >>>>>> Know any decent struts tutorials when
> using
> >  > it
> >  > > >>>>>> on top of SQL Server?
> >  > > >>>>>>
> >  > > >>>>>> Hope all is well.
> >  > > >>>>>>
> >  > > >>>>>> Thanks
> >  > > >>>>>>
> >  > > >>>>>> Godfrey Nolan
> >  > > >>>>>> godfrey@riis.com
> >  > > >>>>>>
> >  > > >>>>>>
> >  > > >>>>>>
> >  > > >>>>>
> >  > > >>>>>
> >  > > >>>>>
> >  > > >>>>
> >  > > >>>
> >  > >
> >  >
> >
>
---------------------------------------------------------------------
> >  > > >>>>> To unsubscribe, e-mail:
> >  > > >>>>
> struts-user-unsubscribe@jakarta.apache.org
> >  > > >>>>> For additional commands, e-mail:
> >  > > >>>> struts-user-help@jakarta.apache.org
> >  > > >>>>>
> >  > > >>>>
> >  > > >>>>
> >  > > >>>> __________________________________
> >  > > >>>> Do you Yahoo!?
> >  > > >>>> The New Yahoo! Shopping - with improved
> >  > product
> >  > > >>>> search
> >  > > >>>> http://shopping.yahoo.com
> >  > > >>>>
> >  > > >>>>
> >  > > >>>
> >  > >
> >  >
> >
>
---------------------------------------------------------------------
> >  > > >>>> To unsubscribe, e-mail:
> >  > > >>>>
> struts-user-unsubscribe@jakarta.apache.org
> >  > > >>>> For additional commands, e-mail:
> >  > > >>>> struts-user-help@jakarta.apache.org
> >  > > >>>>
> >  > > >>>
> >  > > >>>
> >  > > >>>
> >  > >
> >  >
> >
>
---------------------------------------------------------------------
> >  > > >>> To unsubscribe, e-mail:
> >  > struts-user-unsubscribe@jakarta.apache.org
> >  > > >>> For additional commands, e-mail:
> >  > struts-user-help@jakarta.apache.org
> >  > > >>>
> >  > > >>
> >  > > >>
> >  > > >>
> >  >
> >
>
---------------------------------------------------------------------
> >  > > >> To unsubscribe, e-mail:
> >  > struts-user-unsubscribe@jakarta.apache.org
> >  > > >> For additional commands, e-mail:
> >  > struts-user-help@jakarta.apache.org
> >  > > >>
> >  > > >
> >  > > >
> >  > > > __________________________________
> >  > > > Do you Yahoo!?
> >  > > > The New Yahoo! Shopping - with improved
> product
> >  > search
> >  > > > http://shopping.yahoo.com
> >  > > >
> >  > > >
> >  >
> >
>
---------------------------------------------------------------------
> >  > > > To unsubscribe, e-mail:
> >  > struts-user-unsubscribe@jakarta.apache.org
> >  > > > For additional commands, e-mail:
> >  > struts-user-help@jakarta.apache.org
> >  > > >
> >  > >
> >  > >
> >  > >
> >  >
> >
>
---------------------------------------------------------------------
> >  > > To unsubscribe, e-mail:
> >  > struts-user-unsubscribe@jakarta.apache.org
> >  > > For additional commands, e-mail:
> >  > struts-user-help@jakarta.apache.org
> >  > >
> >  >
> >  >
> >  > __________________________________
> >  > Do you Yahoo!?
> >  > The New Yahoo! Shopping - with improved product
> >  > search
> >  > http://shopping.yahoo.com
> >  >
> >  >
> >
>
---------------------------------------------------------------------
> >  > To unsubscribe, e-mail:
> >  > struts-user-unsubscribe@jakarta.apache.org
> >  > For additional commands, e-mail:
> >  > struts-user-help@jakarta.apache.org
> >  >
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


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


Re: Struts/SQL Server rephrased

Posted by Kirk Wylie <kw...@m7.com>.
Then maybe the approach should be to state what I think everybody's 
trying to convey:

1) You have to start with understanding how SQLServer works within Java, 
in other words, learning JDBC.
2) You then have to understand how SQLServer works in any type of web 
application (i.e. how you configure data sources in a container 
environment). Your application server, no doubt, has many different 
examples, though they may not explicitly give SQLServer information (if 
you're worried, I've done this several times with SQLServer with a 
variety of application servers).
3) Once you get to that point, you have to know rough "best practices" 
for working with ANY database server in a Struts web application. All 
the major Struts books cover this in some fashion.

There's nothing that I think we on the list could say about using 
SQLServer specifically with Struts, because the two are orthogonal. I've 
written several Struts applications on top of SQLServer, and nothing in 
the JSP pages or the Struts code actually knows that it's working with 
SQLServer at all (but then again I'm using Hibernate).

Even if you (perish the thought... ;-) use SQL directly from your 
Actions or JSP pages, Struts won't know about it. You're in the realm of 
my #1 and #2 points: this is generic to using JDBC in Web Applications 
(for the code) and SQLServer in Java (for the SQL commands and driver 
trickiness).

If you want any specific tips as to how _I_'ve done it, I'll be happy to 
provide them, but in general, I think that if you've read a good set of 
documentation on points #1-3 it'll be pretty self evident how it works 
together, in that Struts really won't know anything about SQLServer.

Kirk Wylie

Lynn Guy wrote:

> The issue is that the "poor sod" who doesnt know it
> all coming in has 2 stovepipes.  Struts and SQLServer
> (or some other db).  How does one get started when the
> app requires data from a database? Maybe struts
> shouldnt know about the database, fine.  But struts is
> in the mix so there must be an
> approach/mechanism/something that gets the data to the
> page.  Its not magic so where is the discussion of
> approaches to maintaining struts "ignorance" of the db
> while getting my organizationId from the db to the
> page?????
> 
> So far I've got:
>   check out the datasource
>   check some sort of configuration in the webserver
>   check out object-relational mapping
>   check out JDBC
> 
> the rest is to my imagination and if I get it wrong
> you all will be right there to point it out to me
> later why I shouldnt have done that! 
> 
> sorry, but its a pain in the (&*&&%(& to learn and its
> even harder when all the discussions ignore how the
> pieces fit together because they arent supposed to
> know about each other!  Sounds like a catch22 to me.
> 
> --- David Graham <gr...@yahoo.com> wrote:
>  >
>  > --- Mark Lowe <ma...@talk21.com> wrote:
>  > >
>  > > On Wednesday, October 8, 2003, at 07:30 PM, David
>  > Graham wrote:
>  > >
>  > > >
>  > > > --- Mark Lowe <ma...@talk21.com> wrote:
>  > > >> Godfrey
>  > > >>
>  > > >> I think what folks are trying to say is that
>  > the SQL stuff is
>  > > separate
>  > > >> to the struts stuff, and this is kind of what
>  > its about. There is a
>  > > >> data source definition that confuses the hell
>  > out of people new to
>  > > >> struts as it seems to implicitly suggest that
>  > it should be used.
>  > > >>
>  > > >> However most of the folks advise against its
>  > use as it encourages
>  > > >> breaking with MVC.. That said, there are
>  > examples in the
>  > > documentation
>  > > >> and if you're used to quick dirty SQL in html
>  > pages then using struts
>  > > >> even when breaking MVC is still progress.
>  > > >>
>  > > >> You'll want some JDBC references and google
>  > will find you some.
>  > > >>
>  > > >> when you've got the hang of doing SQL (JDBC)
>  > stuff in your struts
>  > > >> flavored webapp. I really dont know why folks
>  > get so snobby about
>  > > >> people breaking with MVC to get started..
>  > > >
>  > > > I wouldn't describe the responses as "snobby".
>  > The question was
>  > > > confusing
>  > > > because Struts has nothing to do with SQL Server
>  > or database access in
>  > > > general.  You can code JDBC in Struts actions
>  > just like a normal
>  > > > Servlet
>  > > > app.  There is no "Struts way" to do database
>  > access.
>  > >
>  > > I know that, you know that, some poor sod with
>  > SQLServer and obviously
>  > > little java experience perhaps doesn't. The
>  > datasource configuration in
>  > > struts config does can lead to folks think there
>  > is..
>  >
>  > I agree, and that's one reason I think the
>  > <data-source> configuration
>  > should be deprecated and removed.  It served its
>  > purpose in the beginning
>  > but now IMO Struts really has no business dealing
>  > with DataSources at all.
>  >
>  > David
>  >
>  > >
>  > >
>  > > >
>  > > >> The funny thing is its the
>  > > >> same folks recommending JSTL which have SQL as
>  > part of the lib.
>  > > >
>  > > > That's like saying you shouldn't use JSP because
>  > it lets you create
>  > > > confusing scriptlets.  You don't have to use the
>  > JSTL's sql tags just
>  > > > like
>  > > > you don't have to use JSP scriptlets for them to
>  > both be good
>  > > > technologies.
>  > >
>  > > I guess what I said could be read like that.. But
>  > tags aren't the same
>  > > as embedding java in your jsp's. At least you can
>  > port the java code
>  > > out of jsp's,  and the java is still java. The
>  > stuff you learn using
>  > > scriptlets is useful across the board and thus
>  > perhaps less of a waste
>  > > of time. If you used SQL tags then what use is
>  > that? Where you going to
>  > > go with them?
>  > >
>  > > So no sorry, its not like saying scriptlets are
>  > bad for this reason,
>  > > its really quite different.
>  > >
>  > > Mark
>  > >
>  > > >
>  > > > David
>  > > >
>  > > >>
>  > > >> When you've done all that and you've seen what
>  > a pain it can be,
>  > > >> you'll
>  > > >> naturally arrive at the point where you'll hate
>  > SQL and be gagging
>  > > for
>  > > >> an object-relational bridge. But I'd worry
>  > about this when you get
>  > > >> here..
>  > > >>
>  > > >> Hope this helps
>  > > >>
>  > > >> Mark
>  > > >>
>  > > >> On Wednesday, October 8, 2003, at 05:26 PM,
>  > Lynn Guy wrote:
>  > > >>
>  > > >>> Let's restate the question...
>  > > >>> I'm new to struts and my database is SQL
>  > Server.  Can
>  > > >>> someone point me in the correct direction
>  > where to
>  > > >>> find out how to set up an environment that
>  > utilizes
>  > > >>> these two to build an application?
>  > > >>>
>  > > >>> --- David Graham <gr...@yahoo.com>
>  > wrote:
>  > > >>>>
>  > > >>>> --- Jayson Falkner <ja...@jspinsider.com>
>  > wrote:
>  > > >>>>> Hi Godfrey,
>  > > >>>>>
>  > > >>>>> I can't think of any, but I'm positive you
>  > would
>  > > >>>> get some pointers if
>  > > >>>>> you asked the Struts user list. I'll send a
>  > copy
>  > > >>>> this to the list.
>  > > >>>>>
>  > > >>>>> Does anyone know of a good Struts tutorial
>  > that
>  > > >>>> also deals with using
>  > > >>>>> SQL Server?
>  > > >>>>
>  > > >>>> They are completely unrelated topics.  Struts
>  > > >>>> actions should never know
>  > > >>>> where you're getting your data.
>  > > >>>>
>  > > >>>> David
>  > > >>>>
>  > > >>>>>
>  > > >>>>>
>  > > >>>>> Thanks,
>  > > >>>>>
>  > > >>>>> Jayson Falkner
>  > > >>>>> jayson@jspinsider.com
>  > > >>>>>
>  > > >>>>>
>  > > >>>>> On Tue, 2003-10-07 at 15:10,
>  > godfrey@riis.com
>  > > >>>> wrote:
>  > > >>>>>> Hey Jayson,
>  > > >>>>>>
>  > > >>>>>> Know any decent struts tutorials when using
>  > it
>  > > >>>>>> on top of SQL Server?
>  > > >>>>>>
>  > > >>>>>> Hope all is well.
>  > > >>>>>>
>  > > >>>>>> Thanks
>  > > >>>>>>
>  > > >>>>>> Godfrey Nolan
>  > > >>>>>> godfrey@riis.com
>  > > >>>>>>
>  > > >>>>>>
>  > > >>>>>>
>  > > >>>>>
>  > > >>>>>
>  > > >>>>>
>  > > >>>>
>  > > >>>
>  > >
>  >
> ---------------------------------------------------------------------
>  > > >>>>> To unsubscribe, e-mail:
>  > > >>>> struts-user-unsubscribe@jakarta.apache.org
>  > > >>>>> For additional commands, e-mail:
>  > > >>>> struts-user-help@jakarta.apache.org
>  > > >>>>>
>  > > >>>>
>  > > >>>>
>  > > >>>> __________________________________
>  > > >>>> Do you Yahoo!?
>  > > >>>> The New Yahoo! Shopping - with improved
>  > product
>  > > >>>> search
>  > > >>>> http://shopping.yahoo.com
>  > > >>>>
>  > > >>>>
>  > > >>>
>  > >
>  >
> ---------------------------------------------------------------------
>  > > >>>> To unsubscribe, e-mail:
>  > > >>>> struts-user-unsubscribe@jakarta.apache.org
>  > > >>>> For additional commands, e-mail:
>  > > >>>> struts-user-help@jakarta.apache.org
>  > > >>>>
>  > > >>>
>  > > >>>
>  > > >>>
>  > >
>  >
> ---------------------------------------------------------------------
>  > > >>> To unsubscribe, e-mail:
>  > struts-user-unsubscribe@jakarta.apache.org
>  > > >>> For additional commands, e-mail:
>  > struts-user-help@jakarta.apache.org
>  > > >>>
>  > > >>
>  > > >>
>  > > >>
>  >
> ---------------------------------------------------------------------
>  > > >> To unsubscribe, e-mail:
>  > struts-user-unsubscribe@jakarta.apache.org
>  > > >> For additional commands, e-mail:
>  > struts-user-help@jakarta.apache.org
>  > > >>
>  > > >
>  > > >
>  > > > __________________________________
>  > > > Do you Yahoo!?
>  > > > The New Yahoo! Shopping - with improved product
>  > search
>  > > > http://shopping.yahoo.com
>  > > >
>  > > >
>  >
> ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail:
>  > struts-user-unsubscribe@jakarta.apache.org
>  > > > For additional commands, e-mail:
>  > struts-user-help@jakarta.apache.org
>  > > >
>  > >
>  > >
>  > >
>  >
> ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail:
>  > struts-user-unsubscribe@jakarta.apache.org
>  > > For additional commands, e-mail:
>  > struts-user-help@jakarta.apache.org
>  > >
>  >
>  >
>  > __________________________________
>  > Do you Yahoo!?
>  > The New Yahoo! Shopping - with improved product
>  > search
>  > http://shopping.yahoo.com
>  >
>  >
> ---------------------------------------------------------------------
>  > To unsubscribe, e-mail:
>  > struts-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail:
>  > struts-user-help@jakarta.apache.org
>  >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 



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


Re: Struts/SQL Server rephrased

Posted by David Graham <gr...@yahoo.com>.
--- Lynn Guy <lg...@yahoo.com> wrote:
> The issue is that the "poor sod" who doesnt know it
> all coming in has 2 stovepipes.  Struts and SQLServer
> (or some other db).  How does one get started when the
> app requires data from a database? 

Write and test classes that perform the business logic needed for your
webapp.  These classes will know about a DataSource object that let's them
talk to the database.  The DataSource is ideally configured in the app
server and looked up with JNDI.

Then, write Struts Actions that take form input and transfers it to your
business logic classes.  The Struts code you write will have no knowledge
of the way your data is stored.  The code from step 1 will be reusable
outside of Struts or even a web environment.

Your initial question would have been better phrased as something like,
"How do you architect a Struts database application?" instead of referring
to specific database products.  Also, some background on how much you
already know would help us know where to start explaining things.

David


> Maybe struts
> shouldnt know about the database, fine.  But struts is
> in the mix so there must be an
> approach/mechanism/something that gets the data to the
> page.  Its not magic so where is the discussion of
> approaches to maintaining struts "ignorance" of the db
> while getting my organizationId from the db to the
> page?????
> 
> So far I've got:
>   check out the datasource
>   check some sort of configuration in the webserver
>   check out object-relational mapping
>   check out JDBC
> 
> the rest is to my imagination and if I get it wrong
> you all will be right there to point it out to me
> later why I shouldnt have done that!  
> 
> sorry, but its a pain in the (&*&&%(& to learn and its
> even harder when all the discussions ignore how the
> pieces fit together because they arent supposed to
> know about each other!  Sounds like a catch22 to me.
> 
> --- David Graham <gr...@yahoo.com> wrote:
> > 
> > --- Mark Lowe <ma...@talk21.com> wrote:
> > > 
> > > On Wednesday, October 8, 2003, at 07:30 PM, David
> > Graham wrote:
> > > 
> > > >
> > > > --- Mark Lowe <ma...@talk21.com> wrote:
> > > >> Godfrey
> > > >>
> > > >> I think what folks are trying to say is that
> > the SQL stuff is
> > > separate
> > > >> to the struts stuff, and this is kind of what
> > its about. There is a
> > > >> data source definition that confuses the hell
> > out of people new to
> > > >> struts as it seems to implicitly suggest that
> > it should be used.
> > > >>
> > > >> However most of the folks advise against its
> > use as it encourages
> > > >> breaking with MVC.. That said, there are
> > examples in the
> > > documentation
> > > >> and if you're used to quick dirty SQL in html
> > pages then using struts
> > > >> even when breaking MVC is still progress.
> > > >>
> > > >> You'll want some JDBC references and google
> > will find you some.
> > > >>
> > > >> when you've got the hang of doing SQL (JDBC)
> > stuff in your struts
> > > >> flavored webapp. I really dont know why folks
> > get so snobby about
> > > >> people breaking with MVC to get started..
> > > >
> > > > I wouldn't describe the responses as "snobby". 
> > The question was 
> > > > confusing
> > > > because Struts has nothing to do with SQL Server
> > or database access in
> > > > general.  You can code JDBC in Struts actions
> > just like a normal 
> > > > Servlet
> > > > app.  There is no "Struts way" to do database
> > access.
> > > 
> > > I know that, you know that, some poor sod with
> > SQLServer and obviously 
> > > little java experience perhaps doesn't. The
> > datasource configuration in 
> > > struts config does can lead to folks think there
> > is..
> > 
> > I agree, and that's one reason I think the
> > <data-source> configuration
> > should be deprecated and removed.  It served its
> > purpose in the beginning
> > but now IMO Struts really has no business dealing
> > with DataSources at all.
> > 
> > David
> > 
> > > 
> > > 
> > > >
> > > >> The funny thing is its the
> > > >> same folks recommending JSTL which have SQL as
> > part of the lib.
> > > >
> > > > That's like saying you shouldn't use JSP because
> > it lets you create
> > > > confusing scriptlets.  You don't have to use the
> > JSTL's sql tags just 
> > > > like
> > > > you don't have to use JSP scriptlets for them to
> > both be good
> > > > technologies.
> > > 
> > > I guess what I said could be read like that.. But
> > tags aren't the same 
> > > as embedding java in your jsp's. At least you can
> > port the java code 
> > > out of jsp's,  and the java is still java. The
> > stuff you learn using 
> > > scriptlets is useful across the board and thus
> > perhaps less of a waste 
> > > of time. If you used SQL tags then what use is
> > that? Where you going to 
> > > go with them?
> > > 
> > > So no sorry, its not like saying scriptlets are
> > bad for this reason, 
> > > its really quite different.
> > > 
> > > Mark
> > > 
> > > >
> > > > David
> > > >
> > > >>
> > > >> When you've done all that and you've seen what
> > a pain it can be, 
> > > >> you'll
> > > >> naturally arrive at the point where you'll hate
> > SQL and be gagging
> > > for
> > > >> an object-relational bridge. But I'd worry
> > about this when you get
> > > >> here..
> > > >>
> > > >> Hope this helps
> > > >>
> > > >> Mark
> > > >>
> > > >> On Wednesday, October 8, 2003, at 05:26 PM,
> > Lynn Guy wrote:
> > > >>
> > > >>> Let's restate the question...
> > > >>> I'm new to struts and my database is SQL
> > Server.  Can
> > > >>> someone point me in the correct direction
> > where to
> > > >>> find out how to set up an environment that
> > utilizes
> > > >>> these two to build an application?
> > > >>>
> > > >>> --- David Graham <gr...@yahoo.com>
> > wrote:
> > > >>>>
> > > >>>> --- Jayson Falkner <ja...@jspinsider.com>
> > wrote:
> > > >>>>> Hi Godfrey,
> > > >>>>>
> > > >>>>> I can't think of any, but I'm positive you
> > would
> > > >>>> get some pointers if
> > > >>>>> you asked the Struts user list. I'll send a
> > copy
> > > >>>> this to the list.
> > > >>>>>
> > > >>>>> Does anyone know of a good Struts tutorial
> > that
> > > >>>> also deals with using
> > > >>>>> SQL Server?
> > > >>>>
> > > >>>> They are completely unrelated topics.  Struts
> > > >>>> actions should never know
> > > >>>> where you're getting your data.
> > > >>>>
> > > >>>> David
> > > >>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> Thanks,
> > > >>>>>
> > > >>>>> Jayson Falkner
> > > >>>>> jayson@jspinsider.com
> > > >>>>>
> > > >>>>>
> > > >>>>> On Tue, 2003-10-07 at 15:10,
> > godfrey@riis.com
> > > >>>> wrote:
> > > >>>>>> Hey Jayson,
> > > >>>>>>
> > > >>>>>> Know any decent struts tutorials when using
> > it
> > > >>>>>> on top of SQL Server?
> > > >>>>>>
> > > >>>>>> Hope all is well.
> > > >>>>>>
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Re: Struts/SQL Server rephrased

Posted by Lynn Guy <lg...@yahoo.com>.
The issue is that the "poor sod" who doesnt know it
all coming in has 2 stovepipes.  Struts and SQLServer
(or some other db).  How does one get started when the
app requires data from a database? Maybe struts
shouldnt know about the database, fine.  But struts is
in the mix so there must be an
approach/mechanism/something that gets the data to the
page.  Its not magic so where is the discussion of
approaches to maintaining struts "ignorance" of the db
while getting my organizationId from the db to the
page?????

So far I've got:
  check out the datasource
  check some sort of configuration in the webserver
  check out object-relational mapping
  check out JDBC

the rest is to my imagination and if I get it wrong
you all will be right there to point it out to me
later why I shouldnt have done that!  

sorry, but its a pain in the (&*&&%(& to learn and its
even harder when all the discussions ignore how the
pieces fit together because they arent supposed to
know about each other!  Sounds like a catch22 to me.

--- David Graham <gr...@yahoo.com> wrote:
> 
> --- Mark Lowe <ma...@talk21.com> wrote:
> > 
> > On Wednesday, October 8, 2003, at 07:30 PM, David
> Graham wrote:
> > 
> > >
> > > --- Mark Lowe <ma...@talk21.com> wrote:
> > >> Godfrey
> > >>
> > >> I think what folks are trying to say is that
> the SQL stuff is
> > separate
> > >> to the struts stuff, and this is kind of what
> its about. There is a
> > >> data source definition that confuses the hell
> out of people new to
> > >> struts as it seems to implicitly suggest that
> it should be used.
> > >>
> > >> However most of the folks advise against its
> use as it encourages
> > >> breaking with MVC.. That said, there are
> examples in the
> > documentation
> > >> and if you're used to quick dirty SQL in html
> pages then using struts
> > >> even when breaking MVC is still progress.
> > >>
> > >> You'll want some JDBC references and google
> will find you some.
> > >>
> > >> when you've got the hang of doing SQL (JDBC)
> stuff in your struts
> > >> flavored webapp. I really dont know why folks
> get so snobby about
> > >> people breaking with MVC to get started..
> > >
> > > I wouldn't describe the responses as "snobby". 
> The question was 
> > > confusing
> > > because Struts has nothing to do with SQL Server
> or database access in
> > > general.  You can code JDBC in Struts actions
> just like a normal 
> > > Servlet
> > > app.  There is no "Struts way" to do database
> access.
> > 
> > I know that, you know that, some poor sod with
> SQLServer and obviously 
> > little java experience perhaps doesn't. The
> datasource configuration in 
> > struts config does can lead to folks think there
> is..
> 
> I agree, and that's one reason I think the
> <data-source> configuration
> should be deprecated and removed.  It served its
> purpose in the beginning
> but now IMO Struts really has no business dealing
> with DataSources at all.
> 
> David
> 
> > 
> > 
> > >
> > >> The funny thing is its the
> > >> same folks recommending JSTL which have SQL as
> part of the lib.
> > >
> > > That's like saying you shouldn't use JSP because
> it lets you create
> > > confusing scriptlets.  You don't have to use the
> JSTL's sql tags just 
> > > like
> > > you don't have to use JSP scriptlets for them to
> both be good
> > > technologies.
> > 
> > I guess what I said could be read like that.. But
> tags aren't the same 
> > as embedding java in your jsp's. At least you can
> port the java code 
> > out of jsp's,  and the java is still java. The
> stuff you learn using 
> > scriptlets is useful across the board and thus
> perhaps less of a waste 
> > of time. If you used SQL tags then what use is
> that? Where you going to 
> > go with them?
> > 
> > So no sorry, its not like saying scriptlets are
> bad for this reason, 
> > its really quite different.
> > 
> > Mark
> > 
> > >
> > > David
> > >
> > >>
> > >> When you've done all that and you've seen what
> a pain it can be, 
> > >> you'll
> > >> naturally arrive at the point where you'll hate
> SQL and be gagging
> > for
> > >> an object-relational bridge. But I'd worry
> about this when you get
> > >> here..
> > >>
> > >> Hope this helps
> > >>
> > >> Mark
> > >>
> > >> On Wednesday, October 8, 2003, at 05:26 PM,
> Lynn Guy wrote:
> > >>
> > >>> Let's restate the question...
> > >>> I'm new to struts and my database is SQL
> Server.  Can
> > >>> someone point me in the correct direction
> where to
> > >>> find out how to set up an environment that
> utilizes
> > >>> these two to build an application?
> > >>>
> > >>> --- David Graham <gr...@yahoo.com>
> wrote:
> > >>>>
> > >>>> --- Jayson Falkner <ja...@jspinsider.com>
> wrote:
> > >>>>> Hi Godfrey,
> > >>>>>
> > >>>>> I can't think of any, but I'm positive you
> would
> > >>>> get some pointers if
> > >>>>> you asked the Struts user list. I'll send a
> copy
> > >>>> this to the list.
> > >>>>>
> > >>>>> Does anyone know of a good Struts tutorial
> that
> > >>>> also deals with using
> > >>>>> SQL Server?
> > >>>>
> > >>>> They are completely unrelated topics.  Struts
> > >>>> actions should never know
> > >>>> where you're getting your data.
> > >>>>
> > >>>> David
> > >>>>
> > >>>>>
> > >>>>>
> > >>>>> Thanks,
> > >>>>>
> > >>>>> Jayson Falkner
> > >>>>> jayson@jspinsider.com
> > >>>>>
> > >>>>>
> > >>>>> On Tue, 2003-10-07 at 15:10,
> godfrey@riis.com
> > >>>> wrote:
> > >>>>>> Hey Jayson,
> > >>>>>>
> > >>>>>> Know any decent struts tutorials when using
> it
> > >>>>>> on top of SQL Server?
> > >>>>>>
> > >>>>>> Hope all is well.
> > >>>>>>
> > >>>>>> Thanks
> > >>>>>>
> > >>>>>> Godfrey Nolan
> > >>>>>> godfrey@riis.com
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>
> > >>>
> >
>
---------------------------------------------------------------------
> > >>>>> To unsubscribe, e-mail:
> > >>>> struts-user-unsubscribe@jakarta.apache.org
> > >>>>> For additional commands, e-mail:
> > >>>> struts-user-help@jakarta.apache.org
> > >>>>>
> > >>>>
> > >>>>
> > >>>> __________________________________
> > >>>> Do you Yahoo!?
> > >>>> The New Yahoo! Shopping - with improved
> product
> > >>>> search
> > >>>> http://shopping.yahoo.com
> > >>>>
> > >>>>
> > >>>
> >
>
---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail:
> > >>>> struts-user-unsubscribe@jakarta.apache.org
> > >>>> For additional commands, e-mail:
> > >>>> struts-user-help@jakarta.apache.org
> > >>>>
> > >>>
> > >>>
> > >>>
> >
>
---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > >>> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > >>>
> > >>
> > >>
> > >>
>
---------------------------------------------------------------------
> > >> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > >>
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > The New Yahoo! Shopping - with improved product
> search
> > > http://shopping.yahoo.com
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > >
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
> http://shopping.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


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


Re: Struts/SQL Server rephrased

Posted by David Graham <gr...@yahoo.com>.
--- Mark Lowe <ma...@talk21.com> wrote:
> 
> On Wednesday, October 8, 2003, at 07:30 PM, David Graham wrote:
> 
> >
> > --- Mark Lowe <ma...@talk21.com> wrote:
> >> Godfrey
> >>
> >> I think what folks are trying to say is that the SQL stuff is
> separate
> >> to the struts stuff, and this is kind of what its about. There is a
> >> data source definition that confuses the hell out of people new to
> >> struts as it seems to implicitly suggest that it should be used.
> >>
> >> However most of the folks advise against its use as it encourages
> >> breaking with MVC.. That said, there are examples in the
> documentation
> >> and if you're used to quick dirty SQL in html pages then using struts
> >> even when breaking MVC is still progress.
> >>
> >> You'll want some JDBC references and google will find you some.
> >>
> >> when you've got the hang of doing SQL (JDBC) stuff in your struts
> >> flavored webapp. I really dont know why folks get so snobby about
> >> people breaking with MVC to get started..
> >
> > I wouldn't describe the responses as "snobby".  The question was 
> > confusing
> > because Struts has nothing to do with SQL Server or database access in
> > general.  You can code JDBC in Struts actions just like a normal 
> > Servlet
> > app.  There is no "Struts way" to do database access.
> 
> I know that, you know that, some poor sod with SQLServer and obviously 
> little java experience perhaps doesn't. The datasource configuration in 
> struts config does can lead to folks think there is..

I agree, and that's one reason I think the <data-source> configuration
should be deprecated and removed.  It served its purpose in the beginning
but now IMO Struts really has no business dealing with DataSources at all.

David

> 
> 
> >
> >> The funny thing is its the
> >> same folks recommending JSTL which have SQL as part of the lib.
> >
> > That's like saying you shouldn't use JSP because it lets you create
> > confusing scriptlets.  You don't have to use the JSTL's sql tags just 
> > like
> > you don't have to use JSP scriptlets for them to both be good
> > technologies.
> 
> I guess what I said could be read like that.. But tags aren't the same 
> as embedding java in your jsp's. At least you can port the java code 
> out of jsp's,  and the java is still java. The stuff you learn using 
> scriptlets is useful across the board and thus perhaps less of a waste 
> of time. If you used SQL tags then what use is that? Where you going to 
> go with them?
> 
> So no sorry, its not like saying scriptlets are bad for this reason, 
> its really quite different.
> 
> Mark
> 
> >
> > David
> >
> >>
> >> When you've done all that and you've seen what a pain it can be, 
> >> you'll
> >> naturally arrive at the point where you'll hate SQL and be gagging
> for
> >> an object-relational bridge. But I'd worry about this when you get
> >> here..
> >>
> >> Hope this helps
> >>
> >> Mark
> >>
> >> On Wednesday, October 8, 2003, at 05:26 PM, Lynn Guy wrote:
> >>
> >>> Let's restate the question...
> >>> I'm new to struts and my database is SQL Server.  Can
> >>> someone point me in the correct direction where to
> >>> find out how to set up an environment that utilizes
> >>> these two to build an application?
> >>>
> >>> --- David Graham <gr...@yahoo.com> wrote:
> >>>>
> >>>> --- Jayson Falkner <ja...@jspinsider.com> wrote:
> >>>>> Hi Godfrey,
> >>>>>
> >>>>> I can't think of any, but I'm positive you would
> >>>> get some pointers if
> >>>>> you asked the Struts user list. I'll send a copy
> >>>> this to the list.
> >>>>>
> >>>>> Does anyone know of a good Struts tutorial that
> >>>> also deals with using
> >>>>> SQL Server?
> >>>>
> >>>> They are completely unrelated topics.  Struts
> >>>> actions should never know
> >>>> where you're getting your data.
> >>>>
> >>>> David
> >>>>
> >>>>>
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Jayson Falkner
> >>>>> jayson@jspinsider.com
> >>>>>
> >>>>>
> >>>>> On Tue, 2003-10-07 at 15:10, godfrey@riis.com
> >>>> wrote:
> >>>>>> Hey Jayson,
> >>>>>>
> >>>>>> Know any decent struts tutorials when using it
> >>>>>> on top of SQL Server?
> >>>>>>
> >>>>>> Hope all is well.
> >>>>>>
> >>>>>> Thanks
> >>>>>>
> >>>>>> Godfrey Nolan
> >>>>>> godfrey@riis.com
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail:
> >>>> struts-user-unsubscribe@jakarta.apache.org
> >>>>> For additional commands, e-mail:
> >>>> struts-user-help@jakarta.apache.org
> >>>>>
> >>>>
> >>>>
> >>>> __________________________________
> >>>> Do you Yahoo!?
> >>>> The New Yahoo! Shopping - with improved product
> >>>> search
> >>>> http://shopping.yahoo.com
> >>>>
> >>>>
> >>>
> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail:
> >>>> struts-user-unsubscribe@jakarta.apache.org
> >>>> For additional commands, e-mail:
> >>>> struts-user-help@jakarta.apache.org
> >>>>
> >>>
> >>>
> >>>
> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product search
> > http://shopping.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Re: Struts/SQL Server rephrased

Posted by Mark Lowe <ma...@talk21.com>.
On Wednesday, October 8, 2003, at 07:30 PM, David Graham wrote:

>
> --- Mark Lowe <ma...@talk21.com> wrote:
>> Godfrey
>>
>> I think what folks are trying to say is that the SQL stuff is separate
>> to the struts stuff, and this is kind of what its about. There is a
>> data source definition that confuses the hell out of people new to
>> struts as it seems to implicitly suggest that it should be used.
>>
>> However most of the folks advise against its use as it encourages
>> breaking with MVC.. That said, there are examples in the documentation
>> and if you're used to quick dirty SQL in html pages then using struts
>> even when breaking MVC is still progress.
>>
>> You'll want some JDBC references and google will find you some.
>>
>> when you've got the hang of doing SQL (JDBC) stuff in your struts
>> flavored webapp. I really dont know why folks get so snobby about
>> people breaking with MVC to get started..
>
> I wouldn't describe the responses as "snobby".  The question was 
> confusing
> because Struts has nothing to do with SQL Server or database access in
> general.  You can code JDBC in Struts actions just like a normal 
> Servlet
> app.  There is no "Struts way" to do database access.

I know that, you know that, some poor sod with SQLServer and obviously 
little java experience perhaps doesn't. The datasource configuration in 
struts config does can lead to folks think there is..


>
>> The funny thing is its the
>> same folks recommending JSTL which have SQL as part of the lib.
>
> That's like saying you shouldn't use JSP because it lets you create
> confusing scriptlets.  You don't have to use the JSTL's sql tags just 
> like
> you don't have to use JSP scriptlets for them to both be good
> technologies.

I guess what I said could be read like that.. But tags aren't the same 
as embedding java in your jsp's. At least you can port the java code 
out of jsp's,  and the java is still java. The stuff you learn using 
scriptlets is useful across the board and thus perhaps less of a waste 
of time. If you used SQL tags then what use is that? Where you going to 
go with them?

So no sorry, its not like saying scriptlets are bad for this reason, 
its really quite different.

Mark

>
> David
>
>>
>> When you've done all that and you've seen what a pain it can be, 
>> you'll
>> naturally arrive at the point where you'll hate SQL and be gagging for
>> an object-relational bridge. But I'd worry about this when you get
>> here..
>>
>> Hope this helps
>>
>> Mark
>>
>> On Wednesday, October 8, 2003, at 05:26 PM, Lynn Guy wrote:
>>
>>> Let's restate the question...
>>> I'm new to struts and my database is SQL Server.  Can
>>> someone point me in the correct direction where to
>>> find out how to set up an environment that utilizes
>>> these two to build an application?
>>>
>>> --- David Graham <gr...@yahoo.com> wrote:
>>>>
>>>> --- Jayson Falkner <ja...@jspinsider.com> wrote:
>>>>> Hi Godfrey,
>>>>>
>>>>> I can't think of any, but I'm positive you would
>>>> get some pointers if
>>>>> you asked the Struts user list. I'll send a copy
>>>> this to the list.
>>>>>
>>>>> Does anyone know of a good Struts tutorial that
>>>> also deals with using
>>>>> SQL Server?
>>>>
>>>> They are completely unrelated topics.  Struts
>>>> actions should never know
>>>> where you're getting your data.
>>>>
>>>> David
>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jayson Falkner
>>>>> jayson@jspinsider.com
>>>>>
>>>>>
>>>>> On Tue, 2003-10-07 at 15:10, godfrey@riis.com
>>>> wrote:
>>>>>> Hey Jayson,
>>>>>>
>>>>>> Know any decent struts tutorials when using it
>>>>>> on top of SQL Server?
>>>>>>
>>>>>> Hope all is well.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Godfrey Nolan
>>>>>> godfrey@riis.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>>>> struts-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail:
>>>> struts-user-help@jakarta.apache.org
>>>>>
>>>>
>>>>
>>>> __________________________________
>>>> Do you Yahoo!?
>>>> The New Yahoo! Shopping - with improved product
>>>> search
>>>> http://shopping.yahoo.com
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>>> struts-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> struts-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: Struts/SQL Server rephrased

Posted by David Graham <gr...@yahoo.com>.
--- Mark Lowe <ma...@talk21.com> wrote:
> Godfrey
> 
> I think what folks are trying to say is that the SQL stuff is separate 
> to the struts stuff, and this is kind of what its about. There is a 
> data source definition that confuses the hell out of people new to 
> struts as it seems to implicitly suggest that it should be used.
> 
> However most of the folks advise against its use as it encourages 
> breaking with MVC.. That said, there are examples in the documentation 
> and if you're used to quick dirty SQL in html pages then using struts 
> even when breaking MVC is still progress.
> 
> You'll want some JDBC references and google will find you some.
> 
> when you've got the hang of doing SQL (JDBC) stuff in your struts 
> flavored webapp. I really dont know why folks get so snobby about 
> people breaking with MVC to get started.. 

I wouldn't describe the responses as "snobby".  The question was confusing
because Struts has nothing to do with SQL Server or database access in
general.  You can code JDBC in Struts actions just like a normal Servlet
app.  There is no "Struts way" to do database access.

> The funny thing is its the 
> same folks recommending JSTL which have SQL as part of the lib.

That's like saying you shouldn't use JSP because it lets you create
confusing scriptlets.  You don't have to use the JSTL's sql tags just like
you don't have to use JSP scriptlets for them to both be good
technologies.

David

> 
> When you've done all that and you've seen what a pain it can be, you'll 
> naturally arrive at the point where you'll hate SQL and be gagging for 
> an object-relational bridge. But I'd worry about this when you get 
> here..
> 
> Hope this helps
> 
> Mark
> 
> On Wednesday, October 8, 2003, at 05:26 PM, Lynn Guy wrote:
> 
> > Let's restate the question...
> > I'm new to struts and my database is SQL Server.  Can
> > someone point me in the correct direction where to
> > find out how to set up an environment that utilizes
> > these two to build an application?
> >
> > --- David Graham <gr...@yahoo.com> wrote:
> >>
> >> --- Jayson Falkner <ja...@jspinsider.com> wrote:
> >>> Hi Godfrey,
> >>>
> >>> I can't think of any, but I'm positive you would
> >> get some pointers if
> >>> you asked the Struts user list. I'll send a copy
> >> this to the list.
> >>>
> >>> Does anyone know of a good Struts tutorial that
> >> also deals with using
> >>> SQL Server?
> >>
> >> They are completely unrelated topics.  Struts
> >> actions should never know
> >> where you're getting your data.
> >>
> >> David
> >>
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Jayson Falkner
> >>> jayson@jspinsider.com
> >>>
> >>>
> >>> On Tue, 2003-10-07 at 15:10, godfrey@riis.com
> >> wrote:
> >>>> Hey Jayson,
> >>>>
> >>>> Know any decent struts tutorials when using it
> >>>> on top of SQL Server?
> >>>>
> >>>> Hope all is well.
> >>>>
> >>>> Thanks
> >>>>
> >>>> Godfrey Nolan
> >>>> godfrey@riis.com
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> > ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail:
> >> struts-user-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail:
> >> struts-user-help@jakarta.apache.org
> >>>
> >>
> >>
> >> __________________________________
> >> Do you Yahoo!?
> >> The New Yahoo! Shopping - with improved product
> >> search
> >> http://shopping.yahoo.com
> >>
> >>
> > ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> >> struts-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> >> struts-user-help@jakarta.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Re: Struts/SQL Server rephrased

Posted by Mark Lowe <ma...@talk21.com>.
Godfrey

I think what folks are trying to say is that the SQL stuff is separate 
to the struts stuff, and this is kind of what its about. There is a 
data source definition that confuses the hell out of people new to 
struts as it seems to implicitly suggest that it should be used.

However most of the folks advise against its use as it encourages 
breaking with MVC.. That said, there are examples in the documentation 
and if you're used to quick dirty SQL in html pages then using struts 
even when breaking MVC is still progress.

You'll want some JDBC references and google will find you some.

when you've got the hang of doing SQL (JDBC) stuff in your struts 
flavored webapp. I really dont know why folks get so snobby about 
people breaking with MVC to get started.. The funny thing is its the 
same folks recommending JSTL which have SQL as part of the lib.

When you've done all that and you've seen what a pain it can be, you'll 
naturally arrive at the point where you'll hate SQL and be gagging for 
an object-relational bridge. But I'd worry about this when you get 
here..

Hope this helps

Mark

On Wednesday, October 8, 2003, at 05:26 PM, Lynn Guy wrote:

> Let's restate the question...
> I'm new to struts and my database is SQL Server.  Can
> someone point me in the correct direction where to
> find out how to set up an environment that utilizes
> these two to build an application?
>
> --- David Graham <gr...@yahoo.com> wrote:
>>
>> --- Jayson Falkner <ja...@jspinsider.com> wrote:
>>> Hi Godfrey,
>>>
>>> I can't think of any, but I'm positive you would
>> get some pointers if
>>> you asked the Struts user list. I'll send a copy
>> this to the list.
>>>
>>> Does anyone know of a good Struts tutorial that
>> also deals with using
>>> SQL Server?
>>
>> They are completely unrelated topics.  Struts
>> actions should never know
>> where you're getting your data.
>>
>> David
>>
>>>
>>>
>>> Thanks,
>>>
>>> Jayson Falkner
>>> jayson@jspinsider.com
>>>
>>>
>>> On Tue, 2003-10-07 at 15:10, godfrey@riis.com
>> wrote:
>>>> Hey Jayson,
>>>>
>>>> Know any decent struts tutorials when using it
>>>> on top of SQL Server?
>>>>
>>>> Hope all is well.
>>>>
>>>> Thanks
>>>>
>>>> Godfrey Nolan
>>>> godfrey@riis.com
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>> struts-user-help@jakarta.apache.org
>>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> The New Yahoo! Shopping - with improved product
>> search
>> http://shopping.yahoo.com
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> struts-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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