struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Levine" <adam_l_lev...@hotmail.com>
Subject Re: Returning data from a ResultSet (via a Collection) to my jsp page...
Date Thu, 17 Jul 2003 19:06:16 GMT
other option.. tie the result collection to the user session.. use an 
appropriate JSTL tag to access the collection from session and process.. 
maybe a combination of c:set, c:forEach...




From: "Adam Levine" <adam_l_levine@hotmail.com>
Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
To: struts-user@jakarta.apache.org
Subject: Re: Returning data from a ResultSet (via a Collection) to my jsp 
page...
Date: Thu, 17 Jul 2003 14:02:47 -0500

Action class:   hits datasource, retrieves results, stores results in user 
session

JSP page:

  [myCustomTag:accessResultSet assignTo="myResults"/]
  [c:forEach/out .... "${myResults[iterator]}"]   .... [/c:forEach/out]


myCustomTag  extends TagSupport
   ... assign datasource results to scripting variable entered in 
'assignTo', by way of TagExtraInfo supporting class, leaving results present 
at the end of the tag, rather than nested in.

hth

-- adam


From: "Zimmerman, Steven R." <srzimmerman@DOC1.WA.GOV>
Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
To: "'struts-user@jakarta.apache.org'" <struts-user@jakarta.apache.org>
Subject: Returning data from a ResultSet (via a Collection) to my jsp 
page...
Date: Thu, 17 Jul 2003 11:47:34 -0700

 > I am a Struts newbie and that being the case I can't seem to get the data
 > from my database back to my view. I realize that there are software
 > packages that will help me do this (i.e. Scaffold) but I would like to be
 > able to do this the vanilla way and then integrate the other more complex
 > items later. Anyway... in my Action class I get the ResultSet and place
 > the data in a Collection. How does this pointer get back to my jsp?  I
 > have searched but can't quite find the right answer with a code example
 > and am unable to get this to work... :)  My Action page I believe is 
fine,
 > it is just how to reference it in the jsp.
 >
 >  Thanx, Steve
 >

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

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus


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

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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


Mime
View raw message