Search code examples
radio-buttonstruts

how to assign value to radio button from <s:property> in struts 2


Please tell me how we can assign a value to radio button from property tag in struts 2.

I'm using this code -

<s:radio name="id" list="{<s:property value='"client_id"'/>}" ></s:radio>

I'm getting this exception -

org.apache.jasper.JasperException: /user.jsp(165,68) equal symbol expected

Solution

  • no need to use property tag inside another struts 2 tag. directly use the value like this

    <s:radio name="id" list="%{client_id}" ></s:radio>
    

    but note that client_id should be a collection