#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    18
    Rep Power
    0

    Servlet doesn't get paramater out of POST-Request


    Hi,

    i have a servlet producing the following HTML-Output:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/transitional.dtd">
    
    <html>
    
    <head>
      <meta http-equiv="pragma" content="no-cache">
      <title>SOC ePayment - Bezahlverfahren ausw&auml;hlen</title>
      <link rel="stylesheet" type="text/css" href="../css/soc.css">
      <base target="_self">
    </head>
    
    <body>
    
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="640">
      <tr height="50"><td width="640" colSpan="3"><img src="../img/tsystems.gif" alt=""></tr></td>
    
      <tr height="10"><td width="640" colSpan="3">&nbsp;</td></tr>
    
      <tr height="1"><td width="640" colSpan="3" bgColor="#000080"><img src="../img/pixel.gif"></td></tr>
    
      <tr>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
        <td width="638"><h1>Bezahlverfahren ausw&auml;hlen<h1></td>
    
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
      </tr>
    
      <tr>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
        <td width="638"><h1>&nbsp;<h1></td>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
      </tr>
    
      <tr>
    
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
        <td width="638">
          <table align="center" border="0" cellpadding="0" cellspacing="0" bgColor="#cccccc">
            <tr height="1"><td colSpan="3" bgColor="#000000"><img src="../img/pixel.gif"></td></tr>
    
            <tr>
              <td width="1" bgColor="#000000"><img src="../img/pixel.gif"></td>
              <td>
                <form method="post" action="/soc/services/TransactionService">
    
                  <table align="center" border="0" cellpadding="5" cellspacing="0" bgColor="#cccccc">
                    <tr>
                      <td width="238"><input type="radio" name="ppdid" value="TESTPPD" tabindex="1">Test-Bezahlverfahren</td>
                    </tr>
                    <tr>
                      <td width="238" align="center"><input type="submit" name="okButton" value="Mit diesm Verfahren bezahlen" tabindex="2"></td>
                    </tr>
                  </table>
    
                  <input type="hidden" name="cmd" value="start_select">
                  <input type="hidden" name="tid" value="sWmSs4YaYSsVsPPwN1ss1NYtZ8smNDk4DtPPxQmWYsw4ERWt0LstwE5QSbXPPzwt">
                  <input type="hidden" name="jsessionid" value="D0A7C03CC70A16B4D6D7930C710F58D4">
                </form>
              </td>
              <td width="1" bgColor="#000000"><img src="../img/pixel.gif"></td>
            </tr>
    
            <tr height="1"><td colSpan="3" bgColor="#000000"><img src="../img/pixel.gif"></td></tr>
    
          </table>
        </td>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
      </tr>
    
      <tr>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
        <td width="638"><h1>&nbsp;<h1></td>
        <td width="1" bgColor="#000080"><img src="../img/pixel.gif"></td>
    
      </tr>
    
      <tr height="1"><td width="640" colSpan="3" bgColor="#000080"><img src="../img/pixel.gif"></td></tr>
    
    </table>
    
    </body>
    
    </html>
    On execution i choose the option from the radio button and i thought that the given value of PPDID will be posted to the servlet. But it doesn't. When i try to get out the servlet parameter with:
    Code:
        // Parameter 'ppdid'
        if(sessionObj.getProperty("ppdid") == null) {
          param = req.getParameter("ppdid");
          if(param != null) {
            log.debug("ppdid=" + param);
            sessionObj.setProperty("ppdid", param);
          }
        }
    I only get an empty string. I can't figure out were the problem is. Can you people help me?

    cu/ walter76
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    18
    Rep Power
    0
    Hi,

    i've solved the problem. Sorry for the unneccesary trouble.
    The problem was my test-application. it posted a empty string for the parameter.
    It seems, that's every time so, when you post your problem you solve it minutes later....

    cu/ walter76

IMN logo majestic logo threadwatch logo seochat tools logo