I have a JSP page that has a table that list each movie in my database. The user should be able to choose one movie from the list for purchase. I am using a form inside my table that has a hidden input and uses the Movie ID number as a parameter. The Servlet takes the parameter and sets it to the session, and sends the response to another JSP page. Everything works fine, unless I choose the first item in the table. So for instance, I have 5 movies in my database, if I choose to purchase the first one my cart.jsp page is empty but if I choose any of the other 4 the cart.jsp page displays the movie ID and Movie title.
Here is my code