how to pass jsp parameters in sql query? : I want to write sql query wch contain parameters from jsp.
I tried to code like

String sqlstring = "\"select"+Activity+" from backgroundcost where onpremprice =' "+service+" '\"";

pstmt ps = con.preparestatment(sqlstring);
Resultset rs = ps.executeQuery();


I m getting error, can i get solution for this