This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Comparing a queryString with a saved value in Bean instance.  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!