I'm trying to get the selected item from a drop down list (in the same jsp page) and pass it to the WHERE statement in my query but i'm unable to do it successfully, how can I pass the selected item to jsp code?
<%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn3 =   DriverManager.getConnection("jdbc:derby://localhost:1527/Registration", "user", "root");
    Statement statement3 =conn3.createStatement();
    ResultSet rs3 = statement3.executeQuery("select ABSTRACT from App.PAPERSUB2 where PAPERNAME= '"+ "How_TO_GET_THE_SELECTED_ITEM" + "'") ;
     if (rs3.next())
       System.out.println(rs3.getString(1));
 %>