Comparing a queryString with a saved value in Bean instance.
posted 2 years ago
So I have this JSP application going of who wants to be a millionaire.
I have a bean, its saved with a string question, 4 different strings of possible answers, a correct answer, useranswer (no value set to bean wasn;t sure about this or what to set it to in bean, any help on this would be nice)
I have a servlet that saves all 20 instances of the bean of arraylist type in a session
I call the first bean instance in a session and it appears in the JSP.
On the jsp. I have 4 forms. with 2 button sets (one hidden that puts a queryString in the URL) and one to submit the answer thats visible. I was wondering how do I check the answer the user clicked with the saved value in the bean.
Do I have to request the getQueryString() and compare it in the bean or is there another way?.