IMHO the DB should never be accessed by anything in the JSP itself, Tag or otherwise. I believe that one of the purposes of having actions is to enable delegation of things like DB access to specialised layers which can then be pluggable. Also, using actions allows processing to be wrapped around the request for the pages as well as decoupling requests for pages and the actual location of these pages on the server.
HTH ;-) ----- Original Message ----- From: "Abhishek Srivastava" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, December 05, 2001 10:53 AM Subject: RE: Action an overkill ?? > Thanks for your reply, > > There is a debate in my team these days on the use of Jsp Tags versus > Actions. > > Some jsp developers feel that ejbs should be accessed via tag libraries, > databases should be accessed via tag libraries and for simple rendering > things like sorting a table jsp tag libraries should be used. While others > like to use Actions for all the things mentioned above. > > Is there a document somewhere which describes what tasks are better suited > for actions and what tasks are better suited for tag libraries. > > Technically, things mentioned above can be done easily by either as action > or as jsp tags.But I want to make a consistent decision through out the > application. > > regards, > Abhishek. > > > A ship in harbor is safe, but that is not what ships are built for. > John A. Shedd > > ***** ***** Abhishek Srivastava > *** /_ __ *** Hewlett-Packard - Solutions Organization > ** / / /_/ ** 19 Cunningham Road. Bangalore -560052. > *** / *** phone +91 80 2251554 Extn:1532 > ***** ***** mailto:[EMAIL PROTECTED] > > >> -----Original Message----- > >> From: Alexander Jesse [mailto:[EMAIL PROTECTED]] > >> Sent: Wednesday, December 05, 2001 4:05 PM > >> To: struts-user > >> Subject: RE: Action an overkill ?? > >> > >> > >> Hi, > >> > >> going through the action hides the > >> presentation-implementation from the user's eyes. > >> > >> For example, the user will only see ".../do/showTable" (or > >> ".../showTable.do") in > >> the browser's address line and therefor not be able to > >> bookmark the jsp-file, when > >> you use an action. > >> > >> The action also allows you to change more implementation > >> details without having > >> to change the presentation (JSP-file)... > >> > >> I advocate strict use of actions in every case... > >> => NEVER use a jsp-link, ALWAYS use an action > >> > >> just my two cents... > >> Alexander Jesse > >> > >> -----Original Message----- > >> From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] > >> Sent: Wednesday, December 05, 2001 10:54 AM > >> To: Struts-User (E-mail) > >> Subject: Action an overkill ?? > >> > >> > >> Hello All, > >> > >> I render a table through my jsp page. The user can sort the table by > >> clicking on each of the column headers. When the user clicks > >> on the column > >> header, an Action is invoked and the data that is used to > >> render the table > >> is sorted accordingly and placed back into the session. Now > >> the control is > >> forwarded to the jsp that renders the table with sorted data/ > >> > >> I have got some feedback that using Action for things like > >> sorting a table > >> is an overkill. what is suggested that each table column > >> should point to a > >> jsp which should use a custom tag library to sort the table. > >> > >> I am unable to decide which approach to take and why. > >> > >> Can someone help me on this. > >> > >> regards, > >> Abhishek. > >> > >> > >> A ship in harbor is safe, but that is not what ships are built for. > >> John A. Shedd > >> > >> ***** ***** Abhishek Srivastava > >> *** /_ __ *** Hewlett-Packard - Solutions Organization > >> ** / / /_/ ** 19 Cunningham Road. Bangalore -560052. > >> *** / *** phone +91 80 2251554 Extn:1532 > >> ***** ***** mailto:[EMAIL PROTECTED] > >> > >> > >> -- > >> To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>