Can you please assist me with the following question?
I am currently working on a project using JSP, where we are utilizing Spring form tags. My issue involves creating two radio buttons that, when clicked, will display different options and pass the selected value to my controller.
- Initially, I tried using form:radiobutton but encountered difficulties adding an onclick/onchange attribute to call my JavaScript.
2. As an alternative, I attempted using an input tag; however, this method does not allow me to directly send the value to the controller. While I can retrieve the value from the session request attributes, I prefer not to disrupt the current code structure where all data is passed from form tags to the backend controller.
The technologies being used in our project include JSP, Spring MVC without annotations, servlets, Java 8, and more. I find myself at a crossroads and unsure of the best approach to achieve my goal. Any guidance or explanation would be greatly appreciated. Thank you for your assistance!