Passing radio button to servlet

here is code from a jsp.... i know im in a servlet forum because this information is SUPPOSED to pass to a servlet.
<% int count=0;
while (res.next()) {
%>          
<tr><td>--> <input type=radio name=rg1 value="+<%= res.getString(4)%>+">
<%= res.getString(1) %></td><td><%= res.getString(2)
%></td><td><%= res.getString(3) %></td></tr>          
<%
count++;
conn.close();essenitally, im connecting to a mysql db and getting information and listing it out. however, i wanted to the "value" of the radio button to represent a unique id number for person. now when i submit the information, how do i get that radio button that was selected. please dont tell me:
String select = req.getParameter("rg1")that does not work for me. i really have no way of knowing which is selected. when i want to pull that information.
any help is appreciated.
thanks!

String select = req.getParameter("rg1")
is correct.
Probably what i would do is 'view source' on the html page to make sure the generated page really looks the way you think it should.
BTW, it would be a good idea to quote your attribute values.

Similar Messages

  • Passing radio button values to the backing bean

    Hi all,
    I need help with passing group of radio button values to a backing bean. I have page which has a dataTable to display a list of alerts. For each alert there are two radio buttons (YES & No) to indicate whether the email option for each alert is set or not. Now when i change the radio buttons and click on a submit button i should be able to pass these radio button values into action method in which i need to update the alerts. This is my code
    <h:form>
    <t:dataTable id="sub"
                       var = "alert"
                       value =#{subscriberBean.alertsList}">
    <t:column>
    <h:outputText value="#{alert.name}" />
    </t:column>
    <t:column>
    <h:selectOneRadio id="subscriptions" value="#{alert.sendEmail}">
      <f:selectItem id="item1" itemLabel="Yes" itemValue="0" />
      <f:selectItem id="item2" itemLabel="No" itemValue="1" />
    </h:selectOneRadio>
    </t:column>
    <t:dataTable>
    <h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" />
    </h:form>
    {code}
    I tried to to do something like below and get the updated list in the action event in the backing bean but it didn't work.
    {code}
    <h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" >
    <f:attribute name="alerts" value="#{subscriberBean.alertsList}"/>
    </h:commandButton>
    // Backing Bean
    public void updateAlert(ActionEvent e){
    List<Alert updateList = (List<Alert>)event.getComponent().
                    getAttributes().get("alerts");
    {code}
    Can someone advise how to get these update radio button values in my actionListener method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The value the user selected will be written to the sendEmail property of the managed bean named alert. We know this because you set the value attribute to #{alert.sendEmail}. So simply access the managed bean in your action method.

  • Radio button options in Servlet

    I am trying to develop radio buttons in a servlet program. The program is supposed to update a database using the radio button options . I am having problem with the program compiling after I add radio buttons.
    When compile the program, I receive an error message: " The local variable Level is never read"
    please tell me what I am doing wrong in the following code:
    private void sendUpdateForm(HttpServletRequest request, HttpServletResponse response)
             throws IOException {
                String ID = request.getParameter("ID");
                  PrintWriter out = response.getWriter();
                  out.println("<BR><H2>Update Form</H2>");
                  out.println("<BR>Please edit the name.");
                  out.println("<BR>");
                  try {
                    String sql = "SELECT Name_of_Officer, Title," +
                      " Level," +
                      "Multiply_View, " +
                      " FROM tDATA.users6" +
                      " WHERE ID=" + ID;
                    Connection conn = DriverManager.getConnection(dbUrl);
                    Statement s = conn.createStatement();
                    ResultSet rs = s.executeQuery(sql);
                    if (rs.next()) {
                       int Level = rs.getInt(1);
                      String Multiply_View = rs.getString(2);
                          out.println("<BR><FORM METHOD=POST ACTION=Resultpage>");
                      out.print("<INPUT TYPE=HIDDEN Name=ID VALUE=" +ID + ">");
                      out.println("<TABLE>");
                      out.println("<TR>");
                      out.println("<TD>Level</TD>");
                      out.print("<BR><INPUT TYPE=RADIO " +
                                "Name=Levels CHECKED VALUE=1>RC Manager" +
                             "<BR><INPUT TYPE=RADIO " +
                      "Name=Levels VALUE=2>Group Manager");
                    out.println("></TD>");
                      out.println("</TR>");
                      out.println("<TD>Multiply View  </TD>");
                      out.print("<TD><INPUT TYPE=TEXT Name=Multiply_View");
                      out.print(" VALUE=\"" + (Multiply_View) + "\"");
                      out.println("></TD>");
                      out.println("</TR>");
                      out.println("<TR>");
                      out.println("<TD><INPUT TYPE=RESET></TD>");
                      out.println("<TD><INPUT TYPE=SUBMIT></TD>");
                      out.println("</TR>");
                      out.println("</TABLE>");
                      out.println("</FORM>");
                    s.close();
                    conn.close();
                  catch (SQLException e) {
                    out.println(e.toString());
                  catch (Exception e) {
                    out.println(e.toString());
           void updateRecord(HttpServletRequest request,   HttpServletResponse response)
             throws IOException {
             String ID = request.getParameter("ID");
             int Level = Integer.parseInt(request.getParameter("Levels"));
             String Multiply_View = request.getParameter(("Multiply_View"));
             PrintWriter out = response.getWriter();
             try {
               String sql = "UPDATE tDATA.users6" +
                 " SET Level ='" + (Level) + "'" +
               " Multiply_View='" + fixSqlFieldValue(Multiply_View) + "'" +
              " WHERE ID=" + ID;
               Connection con = DriverManager.getConnection(dbUrl);
               Statement s = con.createStatement();
               int i = s.executeUpdate(sql);
               if (i==1)
                 out.println("Record updated");
               else
                 out.println("Error updating record");
               s.close();
               con.close();
             catch (SQLException e) {
               out.println(e.toString());
             catch (Exception e) {
               out.println(e.toString());

    When compile the program, I receive an error message:
    " The local variable Level is never read"
    if (rs.next()) { // begin if then block scope
                            // ** Level delcared as local variable of type int
                       int Level = rs.getInt(1); // ** does this get used ???
                      String Multiply_View = rs.getString(2);
                          out.println("<BR><FORM METHOD=POST ACTION=Resultpage>");
                      out.print("<INPUT TYPE=HIDDEN Name=ID VALUE=" +ID + ">");
                      out.println("<TABLE>");
                      out.println("<TR>");
                      out.println("<TD>Level</TD>");
                      out.print("<BR><INPUT TYPE=RADIO " +
                                "Name=Levels CHECKED VALUE=1>RC Manager" +
                             "<BR><INPUT TYPE=RADIO " +
                      "Name=Levels VALUE=2>Group Manager");
                    out.println("></TD>");
                      out.println("</TR>");
                      out.println("<TD>Multiply View  </TD>");
                      out.print("<TD><INPUT TYPE=TEXT Name=Multiply_View");
                      out.print(" VALUE=\"" + (Multiply_View) + "\"");
                      out.println("></TD>");
                      out.println("</TR>");
                      out.println("<TR>");
                      out.println("<TD><INPUT TYPE=RESET></TD>");
                      out.println("<TD><INPUT TYPE=SUBMIT></TD>");
                      out.println("</TR>");
                      out.println("</TABLE>");
                      out.println("</FORM>");
    }// **end if then block scopewas Level intended to be a local variable ?

  • Radio buttons that pass a value to a textfield

    Hi everybody;
    I’m trying to create a “Rating Matrix” for the evaluation of new raw material. On this form I create a group of radio buttons (i.e. Radio1 to Radio5).
    Each radio represents a rating value “Poor=1, Fair=3, Average=5, Good=7, Excellent=9” and I would like to capture this rating (1 or 3 or 5, etc) into a Texfield.
    I work in solving this issue without success, if any of you have any example that I could look at it, I will really appreciate.
    Thanks in advance.

    Thanks for your fast response! WowWhat I'm trying to do, is being able to pass a value to a TextField depending on the ratio button selected.If I choose one of the ratio buttons of the group "Opacity" (Opacity1, Opacity2, Opacity3, Opacity4 or Opacity5), I like the TextField "Rank" to show the value.If Opacity1 selected, Rank field value = 1.If Opacity2 selected, Rank field value = 3.If Opacity3 selected, Rank field value = 5.If Opacity4 selected, Rank field value = 7.If Opacity5 selected, Rank field value = 9.
    You think this can work?
    if(Opacity1.value == "On") {Rank.value==1; // value is added to the texfield;}
    if(Opacity2.value == "On") {Rank.value==3; // value is added to the texfield;} Else if(Opacity3.value == "On") {Rank.value==5; // value is added to the texfield;}
    Sorry not a programmer.I understand the loop, but is not very clear where I need to add this script, on the radio or in the textfield?Thanks.
    Date: Thu, 18 Jul 2013 11:48:28 -0700
    From: [email protected]
    To: [email protected]
    Subject: Radio buttons that pass a value to a textfield
        Re: Radio buttons that pass a value to a textfield
        created by GKaiseril in JavaScript - View the full discussion
    Do you want to count the occurrence of each value and report that in a given text field?
    Do you understand that when no radio button or check box when not selected has a value of the string "Off".
    Assuming that the value for various radio buttons in a group is the value you want to test
    // custom calculation script;
    // count occurrences of "9" values
    var nTest = 9; // value to test for;
    var nCount = 0; // count of occurrences;
    // loop through the fields;
    for(i = 1; i < 6; i++) {
    var nValue = this.getField("Radio" + i).value;
    // test if field value equals test value;
    if(nTest == nValue) {
    nCount++; // values equal so increment count;
    } // end test of field value
    } // end field name loop;
    event.value = nCount; // set field value;
    // end custom calculation script;
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5518047#5518047
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5518047#5518047
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5518047#5518047. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in JavaScript by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Help on Radio Buttons - Retreiving the value in a Servlet

    I am trying to use a Servlet to get values of list of Radio buttons in from a JSP. The problem is that I am getting a "null"
    My JSP has the following:
    <form name="AddNewClient" action="AddNewClient" method="POST">
    <input type="radio" name="TypeOfBusiness" value="Permanent Guarding" />Permanent Guarding (24/7)
    <input type="radio" name="TypeOfBusiness" value="Night Guarding" />Night Guarding
    <input type="radio" name="TypeOfBusiness" value="Interval Patrolling" />Interval Patrolling
    <td><input type="submit" value="Submit" name="Submit" /></td>
    </form>
    My Servlet has following:
    out.println (request.getParameter ("TypeOfService"));
    Anybody with an idea of what I am missing here. The drop-down list works just fine...but i dont want to use it
    Thanks in advance

    Gusha wrote:
    I am trying to use a Servlet to get values of list of Radio buttons in from a JSP. The problem is that I am getting a "null"Edited Code
    Please read it carefully its a simplest thing i can provide you :)
    function setSelection(choice)
         var select=0;
         select=choice;
         if(select=="Permanent Guarding")
              document.AddNewClient.Permanent Guarding.checked=true;
                                    document.AddNewClient.Night Guarding.checked=false;
              document.AddNewClient.Interval Patrolling.checked=false;
                                    document.AddNewClient.TypeOfBusiness.value="Permanent Guarding";
         if(select=="Night Guarding")
                                    document.AddNewClient.Permanent Guarding.checked=false;
                                    document.AddNewClient.Night Guarding.checked=true;
              document.AddNewClient.Interval Patrolling.checked=false;
                                   document.AddNewClient.TypeOfBusiness.value="Night Guarding";
         if(select=="Interval Patrolling")
                                    document.AddNewClient.Permanent Guarding.checked=false;
                                    document.AddNewClient.Night Guarding.checked=false;
              document.AddNewClient.Interval Patrolling.checked=true;
                                   document.AddNewClient.TypeOfBusiness.value="Interval Patrolling";
    </script>
    <form name="AddNewClient" action="AddNewClient" method="POST">
    <input type="radio" name="Permanent Guarding" value="Permanent Guarding"  onclick='setSelection(Permanent Guarding )'/>Permanent Guarding (24/7)<br />
    <input type="radio" name="Night Guarding" value="Night Guarding"  onclick='setSelection(Night Guarding)'/>Night Guarding<br />
    <input type="radio" name="Interval Patrolling" value="Interval Patrolling" onclick='setSelection(Patrolling)' />Interval Patrolling<br />
    <input type="hidden" value="" name="TypeOfBusiness" />
    <input type="submit" value="Submit" name="Submit" />
    </form>And get on the next page
    request.getParameter("TypeOfBusiness");Hope you get it
    Try and if any problem get back
    Sachin Kokcha

  • How to disable the radio buttons in alv lsit .

    hi experts ,
    i created one alv list using oops alv . in list three radio buttons . i used code for that in fieldcat-icon = 'x' .
    then in internal table i passed radiobutton icon . using this code i get a radio buttons on list correct .
    but when iam displaying the alv list . i some rows i want radio buttons in disable mode .
    can any one explain

    Tiberiu,
    I think you need to change the webdynpro for java code using NWDI
    Thanks
    Bala Duvvuri

  • Report With Multiple Radio Button ,How to reset the values of when selected

    Reaching out to the experts here. I have a report which i created a radio group which saves the value rownum when the radio buton is selected to a hidden item based on an on click event. There are currently 3 radio button , i need to be able to "reset" the value of the other items when more than of the button are selected .I.E. There are 3 buttons, user clicks button one , but then decides they need to click button two , then realizes they really wanted to perform button 3 , I want to be able to "reset" the value of the 1st two hidden items so the only value populated is the 3rd hidden item. I am new to working with these features and scenarios so any and help would be appreciated.
    Here is the report
    SELECT APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN1'').value=' || ROWNUM|| '"') UPDATE_RECORD
    ,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN2'').value=' || ROWNUM|| '"') DELETE_RECORD
    ,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN3'').value=' || ROWNUM|| '"') SET_PRIMARY
    ,papf.first_name
    ,papf.last_name
    ,hl.meaning
    ,pp.phone_number
    ,case when phone_type is not null then (select meaning from hr_lookups where lookup_type ='PHONE_TYPE' and pp.phone_type=lookup_code)
    end as phone_type
    ,emrg.primary_contact_flag
    from hr.per_all_people_f papf
    ,apps.hr_lookups hl
    ,apps.per_contact_relationships pcr
    ,apps.per_phones pp
    ,(select contact_person_id,primary_contact_flag
    from apps.per_contact_relationships pcr
    where pcr.person_id = :P5_PERSON_ID
    and contact_type = 'EMRG') emrg
    where pcr.contact_person_id in emrg.contact_person_id
    and pcr.personal_flag='Y'
    and contact_type <> 'EMRG'
    and trunc(sysdate) between date_start and NVL(date_end,'31-DEC-4712')
    and pcr.contact_type = hl.lookup_code
    and hl.lookup_type='CONTACT'
    and pcr.contact_person_id = papf.person_id
    and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    and pcr.contact_person_id = pp.parent_id
    and pp.phone_type in (select lookup_code from hr_lookups where lookup_type ='PHONE_TYPE')

    Related thread here How to Pass values from SQL Report into TEXT ITEM ?
    Regards,

  • How to link a radio button selection to a submit destination ?

    Hi,
    I am working on a JSP page. Depending on the check from a radio button on a form, the form will be submitted to a different destination. Does anyone know how to do that? Any code samples?
    Thanks!
    wyp

    This will give you an idea of how it works. Save the file and double click on it to open in IE.
    <html>
    <head></head>
    <body>
    <form name="myForm" method="GET" action="servlet/InsertRecords">
    <P>
    <INPUT TYPE="RADIO" NAME="Radio1" VALUE="1" onClick="onClickFunction(1)" >Insert Record
    <BR>
    <INPUT TYPE="RADIO" NAME="Radio1" VALUE="2" onClick="onClickFunction(2)" >Delete Record
    <BR>
    </P>
    </form>
    </body>
    <Script Language="JavaScript">
    function onClickFunction(inVar) {
       if (inVar == 1) { document.myForm.action="servlet/InsertRecords";
                         document.myForm.submit(); }
       if (inVar == 2) { document.myForm.action="servlet/DeleteRecords";
                         document.myForm.submit(); }
    </script>
    </html>

  • Radio button on a from generated with PL/SQL procedure

    Hi,
    I have a form generated with PL/SQL procedure. This procedure calls another procedure on 'Submit'. If I select value for the radio button, it works fine. But if no value is given to the radio button on the form, it gives error. Is the radio button mandatory field by nature? or do I need to give default value some how? How do I make the radio button optional? so that I can call the next procedure without passing the param.
    Create or Replace PROCEDURE OBM_PROCEDURE
    htp.formOpen(OWA_UTIL.GET_OWA_SERVICE_PATH || 'process_obm');
    htp.Print('Admin ');
    htp.FormRadio('p_access_level','A');
    htp.Print('Doc ');
    htp.FormRadio('p_access_level','D');
    htp.formSubmit(cname=>'p_button', cvalue=> 'Submit');
    =================================================================
    Create or Replace PROCEDURE PROCESS_OBM
    (p_access_level VARCHAR2,
    p_button VARCHAR2)
    htp.Print('p_access_level ');
    Thanks!

    Hi
    The parameters of the called procedure should have defualt values like this
    create or Replace PROCEDURE PROCESS_OBM
    (p_access_level VARCHAR2 default 1,
    p_button VARCHAR2 default null
    htp.Print('p_access_level ');
    Thanks,
    sharmila

  • How do I use a drop-down box to turn on a radio button?

    I have a dynamic form with a drop-down box containing selections 1, 2, 3, and 4; later in the form I have a radio button group with two radio buttons labeled "pass" and "fail".
    I would like to have drop-down selections 1 and 2 automatically select "fail" and 3 and 4 automatically select "pass" in the radio button group, with the option of the user changing this with a warning message.
    Any help is greatly appreciated.
    Thx
    Drew

    Hi,
    you can use this JavaScript in the change event of your drop down list.
    var sel = xfa.event.newText;
    RadioButtonGroup.rawValue = (sel === "1" || sel === "2") ? 1 : 2;

  • Adding a radio button to a popup

    Hi all
    I have a command button when clicked on it a popup should come and it should display all the Digital certificate names stored in the system in the form of radio button along with certificate names.
    Presently when clicked on command button, the button calls a method in AMIMPL which returns the name of the certificate.
    Now my requirement is a pop should be invoked (This is already done using invoke POPUP method )and the certificate name should be displayed on the popup along with radio button.
    Now please let me know how to pass the certificate name and radio button to popup
    Could anyone help me.
    Thanks in advance.

    This is my managed bean code :-
    public class custom {
    private RichDialog dial;
    private RichPopup hellopopup;
    public custom() {
    public void showPopup(PopupFetchEvent popupFetchEvent) {
    // Add event code here...
    RichOutputText newText = new RichOutputText();
    RichSelectBooleanRadio radio = new RichSelectBooleanRadio();
    newText.setValue("Hello");
    dial.getChildren().add(newText);
    dial.getChildren().add(radio);
    public void setHellopopup(RichPopup hellopopup) {
    this.hellopopup = hellopopup;
    public RichPopup getHellopopup() {
    return hellopopup;
    public void setDial(RichDialog dial) {
    this.dial = dial;
    public RichDialog getDial() {
    return dial;
    public void hello() {
    // Add event code here...
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    hellopopup.show(hints);
    and this is my jspx page code :-
    <f:view>
    <af:document id="d1" initialFocusId="it1">
    <af:messages id="m1"/>
    <af:form id="f1" defaultCommand="cb1">
    <af:commandButton text="commandButton 1" id="cb2"
    action="#{custom.hello}" partialSubmit="true"/>
    <af:popup id="p2" popupFetchListener="#{custom.showPopup}"
    binding="#{custom.hellopopup}">
    <af:dialog id="d3" binding="#{custom.dial}"/>
    </af:popup>
    </af:document>
    </f:view>
    This will work for sure.
    Regards,
    Shah

  • Radio button in bdc multiple transaction

    hi,
        i m working on two dependent transactions in bdc(using call transaction method) on ie01 and ko01 transactions where in in the selction screen i used two radio buttons under one group for calling each transaction,but i m unable to call ko01 transaction when i click to ko01 radiobutton and press execute its going into ie01 transaction,can any one explain how we can write the code to call two transactions seperately and upload data seperatly for both under single radio button group in single pgm......

    Hi Raj,
         Can you please send me the BDC code which you have written for tcode ko01.  I am getting the following problem in BDC code for uploading internal orders in KO01 tcode.
       I want to enable a field in BDC program for ko01 tcode.
    In this tcode, based on order type the business area field is enabling and disabling. If it is enabled then we have to enter business area bcaz its a mandatory field. Business area will be disabled if system generates a value into that field based on order type.
    How can do it in BDC program of this disabling and enabling technique.
    I want to enable the business area irrespective of order type and i will pass the value to it,bcaz in my flat file business area value is given for all order types.
    Its an urgent issue.
    Thanks in Advance.
    Regards,
    Swapna

  • OBIEE 11g - Dashboard Prompts - Radio Buttons

    I have a report where I need to run 3 different ways based on the same filter with different values. Each way has multiple values. I was hoping to create a Dashboard prompt as a radion button to allow the user to select which variation of the report to run. I would like the radio button to pass the multiple values to the filter based on the user's selection. Does anybody know if this is possible? If not, is there another reccommended way. I would prefer not to save three versions of the same report with the only difference being a filter. Also, I would prefer for the users not to have to select multiple values each time they run report depending on the version they want to run.
    Thanks,
    William
    Edited by: user11228139 on Aug 5, 2011 8:51 AM

    wfortson wrote:
    I would like the radio button to pass the multiple values to the filter based on the user's selection. Does anybody know if this is possible?I see only one way. You create the dummy report with appropriate number of columns for filtering using combine request. Each request in this complex report will correspond a choosing in a radio button prompt. In a main report for every filtering column you need to use option 'results are based on another request'.

  • How do I select radio button in a form and also in a table  (urgent)

    Hi all
    I have two radio buttons on top of a table. And within a table for each row I have a radiobutton. When the page shows up in the begining. I am calling the the script
    function selectFirstRow(form) {
              var firstRow=-1;
            for(i=0; i<form.elements.length; i++) {
                 if ( form.elements.type == "radio" ) {
    if ( firstRow < 0 ) {
    firstRow = i;
    form.elements[i].checked = true;
    } else {
    form.elements[i].checked = false;
    It selects the first radio in the datatable which is fine. But it also unselects the radios above the table. I know why it does because in the script it unselects all the radios in that form. Could anybosy help me in modifying the script so that it only does it for a table. I can pass the table id.
    thanks

    To get the radio button inside the table instead of form.elements, get the child nodes of table node.
    Something like this
    var tableObj = document.getElementById('tableId');
    var tbodyObj = tableObj.getElementsByTagName("TBODY")[0];
    var inputObjs = tbodyObj.getElementsByTagName("INPUT");
    var tempChild = null;
    for(var i=0;i<inputObjs.length;++i) {
        tempChild = inputObjs;
    if(tempChild.type == 'radio') {
    // Do something

  • NEED HELP IN RADIO BUTTON QUERY

    Hi, Friends
    I like to query to extract data from my table with the help of radio button but I am not able to think what I should write to query. Plz help.
    The radio button select jsp page code is-
    <form action="queryservice.jsp" method="post">
    <h3><strong>Services Available</strong></h3>
      <p>
        <label>
          <input type="radio" name="service" value="si"  />
          Institutions</label>
        <br />
        <label>
          <input type="radio" name="service" value="sc" />
          Corporate_Offices</label>
        <br />
        <label>
          <input type="radio" name="service" value="sr" />
          Restaurent_Cafe</label>
        <br />
        <label>
          <input type="radio" name="service" value="sb" />
          Bus_Stop</label>
        <br />
        <label>
          <input type="radio" name="service" value="sa" />
          Apartment</label>
        <br />
        <label>
          <input type="radio" name="service" value="sh" />
          Hotels</label>
        <br />
      </p>
      <label>
        <input type="submit" value="Submit" />
      </label>
    </form>And queryservice.jsp page is
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <sql:query var="xyz" scope="request">
       <% String var = request.getParameter("service"); %>
             if(var.equals("si")){ SELECT si FROM serviceTable}
          else if(var.equals("sc")){ SELECT sc FROM serviceTable}
          else if(var.equals("sr")){ SELECT sr FROM serviceTable}
          else if(var.equals("sb")){ SELECT sb FROM serviceTable}
          else if(var.equals("sa")){ SELECT sa FROM serviceTable}
          else if(var.equals("sh")){ SELECT sh FROM serviceTable}
    </sql:query>Please correct it.
    Thanking you

    Error Report-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
           if(var.equals("si")){ SELECT si FROM serviceTable }
          else if(var.equals("sc")){ SELECT sc FROM serviceTable}
          else if(var.equals("sr")){ SELECT sr FROM serviceTable}
          else if(var.equals("sb")){ SELECT sb FROM serviceTable}
          else if(var.equals("sa")){ SELECT sa FROM serviceTable}
          else if(var.equals("sh")){ SELECT sh FROM serviceTable}
    : Non supported SQL92 token at position: 57: SELECT
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException:
           note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
    Apache Tomcat/6.0.14

Maybe you are looking for

  • Office 2013 Click-to-Run

    All, We are having issues with some customers that have the Office 2013 Home and Business Click-to-Run version of office installed.  Users are randomly having their installation corrupted. This interestingly enough didn't start happening until SP1 wa

  • Canon support says this is an Apple issue, Apple Care 3+ yrs old.

    I just purchased a Canon PIXMA MG7250 all-in-one printer.  I'm connecting via WiFi.  The printer installed correctly, the Mac recognizes it and works via WiFi just fine.  But, there are separate drivers for the printer and scanner and my Mac won't re

  • New itunes 11 wont sync new music to iphone

    I downloaded the new version of iTunes the otherday and this morning I downloaded a new cd I've been waiting for for a while. Now that its downloaded and on my computer I can't for the life opf me get it to sync to my iphone.  Ive tried to manually u

  • Solution to view XMP metadata in Adobe Reader ???

    Hello, I´m trying to find a solution to view the xmp metadata with the adobe reader. I know I´m able to view and edit the xmp metadata with adobe acrobat, but is it possible with the adobe reader? What version will I need? Moreover is it possible to

  • "middle end" vs "low end" mbp

    How much better is the middle-end vs the low end, with no upgrades. Will they both play all games now and probably in the next 3 or 4 years(i realize time-viewing is quite hard), at any resolution i dont care THAT much, although it is also nice to ha