For my Java class with resultset I am trying to get the request.getParameter value.
Please advise if this is the correct way use the request object in a Java class because I cant seem to get any data from the request object.
...
import javax.servlet.*;
import javax.servlet.http.*;
.....
HttpServletRequest request = null;
String cityEntry = request.getParameter("city");
try{
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from cityTable where city = 'Boston'");
while (rs.next())
{
String city = rs.getString("city");
if(cityEntry.equals(city))
{
//do something...
...............
}