Use the value attribute of the <html:select> and assign it the required
value. But value attribute does not take the property of the form bean. It
takes the value explicitly specified. e.g <hml:select value="A".... >
If you specify <hml:select value="val".... > then it will search for the
string "val" in the options list.
Affan

----- Original Message -----
From: "shashi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 12:08 PM
Subject: Use of Bean Default Value in Struts


Hi

In my form in the <select> i want a default bean value will be
selected.
Ex:
public class A extends ActionForm{
private String val="A";
public void setVal(String val){
this.val=val;
}
public String getVal(){
return val;
}
In Jsp
I want this "A" value comes as a default value in select.

help me

Regards

Shashi







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to