hi,my teacher asked me to make a Response Form.It contains 20 question. It has multiple choices. choice will vary from 3 to 6.I have to make it with help of jsp.Question will be filled by other person i have to make database in mysql.i m facing problem in how to retrieve data from table.I donot know how to call i all question. Can u help me to out...i using hibernate too...which is al follow...
this is JSP page.
Long id=Long.valueOf(request.getParameter("id"));
Question q=(Question) com.ats.survey.utils.HibernateUtils.currentSession ().get(Question.class, id);

if (q==null){
String page_forward="serial.jsp";
String message= " you have not entered wrong serial Number";

<title> ATS EMPLOYEE SURVEY </title>
<h1 align="center"> RESPONSE FORM </h1>
<form action="thanks.jsp" method="POST" name="responseform">
<td>Resonse Caption 1:</td>
<td>Response 1:<input type="radio" name="group1"></td>
<td>Resonse Caption 2:</td>
<td>Response 2:<input type="radio" name="group1"></td>
<td>Resonse Caption 3:</td>
<td>Response 3:<input type="radio" name="group1"></td>
<td>Resonse Caption 4:</td>
<td>Response 4:<input type="radio" name="group1"></td>
<td>Resonse Caption 5:</td>
<td>Response 5:<input type="radio" name="group1"></td>
<td>Resonse Caption 6:</td>
<td>Response 6:<input type="radio"name="group1"></td>

<br><input type="submit" value="SUBMIT" />

my java class
ublic class Question {

// This id for hibernate mapping
long id;
String questions;
long serialNumber;
//resp for response cap for caption
String resp1Caption;
String resp2Caption;
String resp3Caption;
String resp4Caption;
String resp5Caption;
String resp6Caption;
char resp1;
char resp2;
char resp3;
char resp4;
char resp5;
char resp6;


public long getId() {
return id;
public void setId(long id) {
this.id = id;

public String getQuestions() {
return questions;
public void setQuestions(String questions) {
this.questions = questions;
public long getSerialNumber() {
return serialNumber;
public void setSerialNumber(long serialNumber) {
this.serialNumber = serialNumber;
public String getResp1Caption() {
return resp1Caption;
public void setResp1Caption(String resp1Caption) {
this.resp1Caption = resp1Caption;
public String getResp2Caption() {
return resp2Caption;
public void setResp2Caption(String resp2Caption) {
this.resp2Caption = resp2Caption;
public String getResp3Caption() {
return resp3Caption;
public void setResp3Caption(String resp3Caption) {
this.resp3Caption = resp3Caption;
public String getResp4Caption() {
return resp4Caption;
public void setResp4Caption(String resp4Caption) {
this.resp4Caption = resp4Caption;
public String getResp5Caption() {
return resp5Caption;
public void setResp5Caption(String resp5Caption) {
this.resp5Caption = resp5Caption;
public String getResp6Caption() {
return resp6Caption;
public void setResp6Caption(String resp6Caption) {
this.resp6Caption = resp6Caption;
public char getResp1() {
return resp1;
public void setResp1(char resp1) {
this.resp1 = resp1;
public char getResp2() {
return resp2;
public void setResp2(char resp2) {
this.resp2 = resp2;
public char getResp3() {
return resp3;
public void setResp3(char resp3) {
this.resp3 = resp3;
public char getResp4() {
return resp4;
public void setResp4(char resp4) {
this.resp4 = resp4;
public char getResp5() {
return resp5;
public void setResp5(char resp5) {
this.resp5 = resp5;
public char getResp6() {
return resp6;
public void setResp6(char resp6) {
this.resp6 = resp6;


configration file..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"

<class name="com.ats.custFlight.pojo.CustomerDetail" table="CUSTOMERTABLE" lazy="false">
<id name="id" column="ID">
<generator class="increment" />
<property column="S_NO" name="serialNumber"/>
<property column="QUESTION_DETAILS" name="questions"/>
<property column="RESPONSE1" name="resp1"/>
<property column="RESPONSE1_CAPTION" name="resp1Caption"/>
<property column="RESPONSE2" name="resp2"/>
<property column="RESPONSE2_CAPTION" name="resp2Caption"/>
<property column="RESPONSE3" name="resp3"/>
<property column="RESPONSE3_CAPTION" name="resp3Caption"/>
<property column="RESPONSE4" name="resp4"/>
<property column="RESPONSE4_CAPTION" name="resp4Caption"/>
<property column="RESPONSE5" name="resp5"/>
<property column="RESPONSE5_CAPTION" name="resp5Caption"/>
<property column="RESPONSE6" name="resp6"/>
<property column="RESPONSE6_CAPTION" name="resp6Caption"/>


thnk you