Problem with if statement...
I have a form with a hidden field named fsearch
On the next page I use:
String search = (String) request.getParameter("fsearch");
The value if search coming through is "location".
Now I have this if but it never enters the loop...why?
if (search == "location")
{
out.println("<center>Choose a location:<P>");
// generate query
String Query = "SELECT DISTINCT city FROM resumeHolders ORDER BY city";
// get result
ResultSet SQLResult = SQLStatement.executeQuery(Query);
while(SQLResult.next())
{
//Name= SQLResult.getString("firstName");
City= SQLResult.getString("city");
out.println("<a href=\"view_resumes.jsp?city=" + City + "\">" + City + "</a>
");
}
// close connection
SQLResult.close();
SQLStatement.close();
Conn.close();
}

