Dear all

I have couple questions which related with Struts i
got from the Web. and need someone to help me
out................
 
** For the 1st question. i'm just wondering which
statement's ("1" or "2") performance will be better 
   when it fetchs the result to the JSP? and what's
different if i choose to use either one? 

ActionClass --- JSP
------------------------
.........
........
ArrayList al2 = new ArrayList();
al2=getData();
........
....
1.request.setAttribute("al2",al2);
2.session.setAttribute("al2",al2);
.........
.......


** Continue the 1st question, i'm just curious why it
need to reset the 
    "pageContext.setAttribute("att2", attr2)" in the
JSP instead of calling 
   the "setAttribute" string from the ActionClass
directly?
   and what's the best practice on using
"pageContext"?

Jsp
-------------------------------------
java.util.ArrayList
attr2=(java.util.ArrayList)request.getAttribute("al2");
  
pageContext.setAttribute("att2", attr2);
...
...
...
<html:select  property="user_name" > 
<html:options collection="att2" property="store_id"
labelProperty="attr_name"/>
...........
..........

Thanks in advance...........
  
Kurt

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to