Hi all,

I was wondering if anyone knew of anyway to bind a value to a session within
a "for" loop without overwriting the previous session value.
The problem is session.setAttribute() will always overwrite the value of the
previous session, so when i get to the end of the for loop, the session will
always pass the last parameter value to the servlet.

I want to pass the specific values to the session the user clicking on the
hyperlink that invokes the servlet.

cheers,
Kate.


*****************************************************
<PRE>
        <%
                int x = newTable.length;

                for (int i=0; i<x; i++){

                        String outString = newTable[i];

                        //extract the member number from the String

                        StringTokenizer st = new StringTokenizer(outString,
" ", false);
                        String mn = st.nextToken();
                        String s = st.nextToken();
                        String fn = st.nextToken();


                                String[] member = new String[1];
                                member[0] = mn;

                                session.setAttribute("MemberNo", member);


                                out.println("<A
HREF='http://healthtest:80/gmfhealth/servlet/AbsoluteServlet'><FONT
COLOR=#FFFFFF SIZE=1 FACE=arial, helvetica>" + mn + " " + s + " " + fn +
"</FONT><BR><BR></A>");

                 }



        %>

</PRE>
*****************************************************
____________________________________________________________________________
________________________________________

IMPORTANT:  This email is intended only for the use of the individual or
entity named above and may contain information that is confidential and
privileged. The views expressed in this e-mail are those of the author and
not of the company unless otherwise clearly indicated.  When addressed to
our clients, any information or quotes contained in this e-mail are subject
to the terms and conditions relevant at that time to the matter being
addressed.  If you are not the intended recipient and have received this
e-mail in error, please notify us immediately by return email or telephone
+61 8 93235555 and delete the e-mail and any attachments without using or
disclosing the contents in any way.  If you are not the intended recipient
any dissemination, distribution or copying of this e-mail is strictly
prohibited. Before opening or using attachments, check them for viruses and
defects.  Our liability is limited to re-supplying any affected attachments.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to