title: How to pass JSP parameters to a SQL query?
body: <p>I want to write a SQL query which contains parameters from a JSP.
  I tried it like this</p>
  
  <pre><code>String sqlstring = "\"select"+Activity+" from backgroundcost where onpremprice =' "
                           +service+" '\"";
  PreparedStatement ps = con.prepareStatement(sqlstring);
  ResultSet rs = ps.executeQuery();
  </code></pre>
  
  <p>I'm getting an error.</p>