File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes populating jsp fields from java object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "populating jsp fields from java object" Watch "populating jsp fields from java object" New topic
Author

populating jsp fields from java object

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
Say i have a list box. Right now what I need to do is to populate this select box from a java object. How do I do this. Can anybody send me code ??? This is a demi. I need to populate the java object in the JSP code itself. How to do this. Please help
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Iterate through the collection that contains what goes in the listbox and just add it to the listbox.
Iterator j = yourList.iterator()
while(j.hasNext())
{
perform appropriate castto get the object
add it to the listbox/combobox
}


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: populating jsp fields from java object