• Post Reply Bookmark Topic Watch Topic
  • New Topic

about getParameter  RSS feed

 
deepak borole
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am developing an online quiz...i have a main table on the server from which user depending on his choice selects questions from the table and they are displayed ........for displaying those i m using a loop in which there are 4 radio buttons which corresponds to the option of tat particular question....now i have given them same name as v need 2 select only 1 radio button from those 4....the name which i have given is not a string directly eg. check but instead i have given name as a variable which gets evaluated at runtime and the name is given eg. <%=num%> ....now i have to access the selected radio buttons value on next page but i cant use request.getParameter(num) because getParameter() needs a string as a parameter and num is not a string....what can i do?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request parameter names and values are always strings no matter how you emit them to the JSP page in the first place.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!