Don't use an HTML document; use a JSP and iterate through the array with an iterator tag. See:
 
http://jakarta.apache.org/struts/struts-logic.html#iterate
 
for more info.
 
Mark
-----Original Message-----
From: Chanel Tien [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 3:05 PM
To: [EMAIL PROTECTED]
Subject: How to pass an array from servlet to html?

Hi,

  I have an array of query result (Sybase) in my servlet and need to display the array in a table form (or a list) in html
so I can add/remove elements from this array. I tried to use some variables in html; however, the size of this array varies
so I cannot define a fixed number of variables inside the html form.  I know I can pass the size of array as a hidden variable
to html by replacing (string), but I have no idea how to pass the entire array (passing the elements one at a time would
run into the problem mentioned above).  Thanks in advance:)
 

Regards,
 

-chanel

  

Reply via email to