struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john lee <sh_thorn_b...@yahoo.com>
Subject RE: reference variable in struts 1 and 2
Date Tue, 14 Apr 2009 21:14:23 GMT

i know <s:set.....but i just do not know how to put it into jsp file
  <% 
    varialble  
   %>
 
for further processing as the demo i show that i did in struts 1.X
 
john
 

--- On Tue, 4/14/09, Security Management <list-subscriptions@secmgmt.com> wrote:


From: Security Management <list-subscriptions@secmgmt.com>
Subject: RE: reference variable in struts 1 and 2
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Date: Tuesday, April 14, 2009, 4:02 PM


http://struts.apache.org/2.1.6/docs/set.html

-----Original Message-----
From: john lee [mailto:sh_thorn_bird@yahoo.com] 
Sent: Tuesday, April 14, 2009 4:52 PM
To: user@struts.apache.org
Subject: reference variable in struts 1 and 2

in struts 1
  if need to get variable from action, and do further processing, could do
following
<logic:iterate id="plist" name="partlist" scope="session"
type="neuco.CartItemsForm">
   <%
     
qty_available=((CartForm)pageContext.findAttribute("plist")).getQty_availabl
e();
      ...
   %>
</logic:iterate>
 
but in struts 2
       public class Cart {
                int qty_available;
                int getQty_available();
                ...
       }
 i know in jsp , could do <s:property value="qty_available"> to get
variable, 
 but, how to put this into jsp file, and do further processing as Struts 1
did ?
 something like <%  #{qty_available} %>
 
tks in advance
 
john
 
 
    
         


      


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




      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message