This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Collections in Struts jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Collections in Struts jsp" Watch "Collections in Struts jsp" New topic
Author

Collections in Struts jsp

titan sim
Greenhorn

Joined: Oct 06, 2003
Posts: 9
I've a value object, which returns a id and email Collection.

My action class will put the VO into the actionForm and then into request scope.
On my jsp, I can display the id by using <html:text property=vo.id>. However, if I use <html:text property=vo.id>, it will not display my email values.
how do i display the email collection, it should be able to display 1 textbox for each value.
Eg. if my Email has value abc@yahoo.com, abc@abc.com. then the display will be something like this:
<input type=text value=abc@yahoo.com name=??>
<input type=text value=abc@yahoo.com name=??>
pls help, thanks!
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

Either use logic:iterate or the JSTL forEach. See this article: http://www-106.ibm.com/developerworks/java/library/j-jstl0318/


Junilu - [How to Ask Questions] [How to Answer Questions]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Collections in Struts jsp
 
Similar Threads
error occuring while use jsp
text field validation
Struts Validation Empty alert Box
displaying data from arrays with html:text
how to combine html:text and bean:write