Waz up All, I don't know how many other pepe's are getting this error message but its stumping me. Here's the scenario: I have two servlets, one called Employee_Category where an employee sends a category via a from method to the Employee_Items servlet...here is that code: out.println("<form method=\"POST\"action=\"Employee_Category_A\">"); out.println("<p align=\"center\">Categories</p>"); out.println("<p align=\"center\"><select size=\"5\" name=\"Category\">"); while (RS.next()) { //iterates through the results of the query... out.println("<option>" + RS.getString(1) + "</option>"); } out.println("</select> </p>"); out.println("<p align=\"center\"><a href=\"Employee_Items\">Click here to display the"); out.println("items of the category</a></p>"); I apologize for the spaghetti code. That code works like a charm. Now I go to my Employee_Items servlet and I over ride the post method and grab the paramter from the Employee_Category servlet. Now after that I want to query the database using the parameter from the Category servlet and it seems like I have to over ride the get method to do this. But how can I get the parameter from the Category servlet? I'm stumped yo! thanks, Matt
Here's my code for the Items servlet (some of it)
PreparedStatement stmt = C.prepareStatement ("select item from item where category =?"); //this sets the ?'s values in numerical order stmt.setString(1,Category);
//executes the query ResultSet RS = stmt.executeQuery();
//for debugging purposes only //System.out.println("WE'RE CONNECTED");
out.println("<form method=\"POST\" action=\"Employee_verify.html\">"); out.println("<p align=\"center\">Office Supplies:</p>"); out.println("<p align=\"center\"><select size=\"5\" name=\"ItemBid\">"); while (RS.next()) { //iterates through the results of the query... out.println("<option>" + RS.getString(1) + "</option>"); }
dtownbound
Greenhorn
Joined: May 13, 2001
Posts: 2
posted
0
NEVERMIND!!! THE SUBMIT BUTTON HELPS ;-)! Oh well sorry for the long post disregard it y'all!
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
"dtownbound", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.