File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Probem of html:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Probem of html:select" Watch "Probem of html:select" New topic

Probem of html:select

Irshad Malek

Joined: Aug 04, 2005
Posts: 25

I have one select box in my jsp per record,
there are some values are coming from database in that select box,
what i m doing i m just taking that values from database and setting it into object and that object i m setting into the list,

this is my code of jsp

<html:select property="name">
<html ptions collection="list" property="name" labelProperty="name" />

list i set into request from my action class

this list contains many names,
and i have one name per record and i want that to be selected that perticular name,

how i do,

Thank You

Vijendra Runwal
Ranch Hand

Joined: Apr 17, 2006
Posts: 52
i think for that you need to have different names for options property and select property.
The option property will help you set the selected value.
But in your case both the names are same.
try different names then try.
hope that might work out??

I agree. Here's the link:
subject: Probem of html:select
It's not a secret anymore!