This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi Pal , Here is a hint this can be done easily with a Hidden variable and in JSP.
Give two check boxes with values Y and N ..whenever any one of them is checked...pass this value to the hidden variable....
I think u should be using a radio button for this purpose..as the user has to say either a 'Yes' or a 'No' he cannot say both...
As this is in the Servlets forum I will give an answer relative to Servlets.
In your HTML you will have something like <input type="checkbox" name="widget1" />
In your Servlet do the following.. boolean jumpball = (request.getParameter("widget1") != null);
If the checkbox is checked, a parameter with the name of widget1 (value is not needed) will be available, thus not equal to null. If the checkbox is not checked there will not be a parameter with the name of widget1, or equals to null.
One line of code on the servlet side handles this without having to change the checkbox.