Struts 2 sradio input type radio sample code

Struts 2 sradio input type radio sample code

Here you will see how to use s:radio which is similar to input type radio. Below is sample which we use in our demo and also field label will be retrieved from ResourceBundle using key attribute:

<s:radio list=”radioButtonList” name=”selectedRadionButton” id=”radionButton” label=”label.state” />

  • Project structure:

Struts 2 sradio input type radio sample code

  • input.jsp:

  • success.jsp:

  • Struts2SampleCodeAction.java:

  • Web page output:

Struts 2 sradio input type radio sample code

  • After Submit button click:

Struts 2 sradio input type radio sample code

For more information please visit struts site here

download  Download Project:  Struts2ExampleCode

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *