title: get value from database table where id = ? java
body: <p>I have one table 
  <a href="https://i.stack.imgur.com/tsgre.jpg" rel="nofollow noreferrer">Table name is PARKTABLE</a></p>
  
  <p>Now I want to get these values in jsp 
  my code is here </p>
  
  <pre><code> &lt;jsp:useBean id="loginBean" scope="session" class="vustudent.Login" /&gt;
          &lt;input type="text" name="takei" value='&lt;jsp:getProperty name="loginBean" property="loginid" /&gt;' /&gt;
          &lt;%
              String dbId = request.getParameter("takei");
              Class.forName("org.apache.derby.jdbc.ClientDriver");
              String url= "jdbc:derby://localhost:1527/sample;create=true; user=app; password=app";
              Connection con = DriverManager.getConnection(url);  
              Statement st= con.createStatement();
              String query = "SELECT * FROM PARKTABLE WHERE ID =\'"+ dbId + "\' ";
              ResultSet rs = st.executeQuery(query);
              // iterate through the java resultset
        if (rs.next())
        {
          String placeOne = rs.getString("Place1");
          String placeTwo = rs.getString("Place2"); 
          System.out.println("place1" +placeOne);
          System.out.println("place1" +placeTwo);
        }
          %&gt;
          &lt;/br&gt;
          &lt;input type="text" name="pl1value" value='placeOne' /&gt;
  </code></pre>
  
  <p>it prints placeOne in input text field istead of its value. 
  I want to print placeOne value red or green from database. 
  where I am wrong?</p>