Radio button in Struts
Hi,
I want to preselect a radio button and having trouble with it. The jsp file has a file upload. Here there is no Action form for this and directly have Action class.
I have a jsp code like this:
<b>Select File:</b> <html:file property="usrFile" />
<b>Select Transaction Type: </b>
<html:radio property="transFlag" value="T"/>T
<html:radio property="transFlag" value="P"/>P
The code in Action class is,
DynaActionForm dynaForm = (DynaActionForm) form;
FormFile usrFile = (FormFile) dynaForm.get("usrFile");
String[] FLAG_STR = (String[]) dynaForm.get("transFlag");
In struts-config file,
<form-bean name="submitTransForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="usrFile" type="org.apache.struts.upload.FormFile"/>
<form-property name="transFlag" type="java.lang.String[]" />
</form-bean>
Thank you.

