i need help in JSP.
Expand|Select|Wrap|Line Numbers
- String stateId = request.getParameter("State");
- String query = "select distinct CITY from STATES where STATE = '"+stateId+"'";
- stmt = con.prepareStatement(query);
- rs = stmt.executeQuery();
- String City=null;
- while(rs.next())
- {
- City=""+rs.getString(1)'
- }
- out.print(City);
- }
- rs.close();
i want to get all city in the table.
how i want to write the code to get all city.,
i'm new to JSP Please Help me........,
Please Help me...,