Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8770459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:33:46+00:00 2026-06-13T17:33:46+00:00

jsp file <s:iterator value=questions status=status> <table border=3px bgcolor=yellow> <tr bgcolor=white > <td nowrap><s:property value=QuestionNumber/></td>

  • 0

jsp file

 <s:iterator value="questions" status="status">
   <table border="3px" bgcolor="yellow">
   <tr bgcolor="white" >
   <td nowrap><s:property value="QuestionNumber"/></td>
   <td nowrap><s:property value="Question"/></td>
   </tr>
   <tr>
   <td nowrap><input type="radio" name="<s:property value="QuestionNumber"/>" value="1"/><s:property value="Option1"/></td>
   <td nowrap><input type="radio" name="<s:property value="QuestionNumber"/>" value="2"/><s:property value="Option2"/></td>
   </tr>
   <tr>
   <td nowrap><input type="radio" name="<s:property value="QuestionNumber"/>" value="3"/><s:property value="Option3"/></td>
   <td nowrap><input type="radio" name="<s:property value="QuestionNumber"/>" value="4"/><s:property value="Option4"/></td>
   </tr>
   </table>
   <s:hidden> </s:hidden>
 </s:iterator>
 <s:hidden id="answers" value="answers"/>
 <s:submit name="submit" onclick="submitform()"/>
</s:form>

property values are being populated from DB using the Action class.
My problem is that i want to collect the list answers for a quiz and get it to the java classes for evaluation of score. Im not able to get any idea as how to do it

My DB has Questions table with the list of questions with options and correct answer.

I have a Question Bean Object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:33:47+00:00Added an answer on June 13, 2026 at 5:33 pm

    You have an Action with a private List<Question> questions;, with Getter and Setter.

    You populate your JSP reading the list from the Getter.

    You can post that list back from the JSP to the Action’s Setter by using OGNL for keeping informations on lines detail.

    To do this, use Struts tags (<s:radio instead of <radio ) and set a name including the index of the line.

    For example, with a textfield, instead of

     <s:iterator value="questions" status="status">
         <s:textfield name="question" />
     </s:iterator>
    

    use something like (untested, maybe some adjustments needed)

     <s:iterator value="questions" status="status">
         <s:textfield name="questions[%{#status.index}].question" />
     </s:iterator>
    

    Just adapt this for your radio case,

    and in the Action you will receive your List fully populated.

    (You can even validate a list posted like this usign Visitor validator: not your case, but it’s worth knowing).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jsp file: validate.jsp- var rollNo=document.forms[result_form][studentRollno].value; var name=document.forms[result_form][studentName].value; $(#student_result).load(result.jsp?rollNo=+rollNo+&name=+name); As you can
I have created a jsp file, with a simple table on it. I would
JSP CODE: Upload File: <input name=file type=file id=file><br><br> <input type=submit name=Submit value=Submit/><br><br> <input type=reset
My jsp file contains the following code: <portlet:actionURL var=patientProfileURL name=editPatientProfile> <portlet:param name=jspPage value=/patientProfile.jsp />
I have a jsp file that contains this code, <form id=testForm> <input type=hidden value=study--study
Below is my jsp file, once I process some value and display the value
I'm calling InserStudent.jsp file in action of the form from AddStudent.jsp from where I
I have a jsp file in the root of .war file. and then I
I have a .jsp file that receives a request and checks the request's parameters.
While writing a .jsp file, can i include all the html5 tags in it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.