This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
didnt you by accident declare preparestatement twice? here: <%! int id; Connection conn=null; PreparedStatement pstm=null; ResultSet rs=null; %> and here: PreparedStatement pstm=conn.PrepareStatement("Select * from directory where id =?");
just write in the second time: pstm=conn.prepareStatment etc..... (drop the PreparedStatement declration again) im not sure if it is the problem , but i hope it helps somehow.