Hi, My form.html is following: <form action="result.jsp" method="get"> <p>First name <input type="text" name="firstName" /></p> <p>Surname <input type="text" name="surname" /></p> Male<input type="radio" name="sex" value="male" /> Female<input type="radio" name="sex" value="female" /><br> Preferable country to live <select name="countryType"> <option value="poland">Poland</option> <option value="norway" selected>Norway</option> <option value="hungary">Hungary</option> <option value="vietnam">Vietnam</option> <option value="uk">UK</option> <option value="france">France</option> </select> <p><input type="submit" /></p> </form>
And code in result.jsp is: Person person1 = new Person(); person1.setFirstName(request.getParameter("firstName")); person1.setSurname(request.getParameter("surname")); person1.setSex(request.getParameter("sex")); person1.setCountryType(request.getParameter("countryType")); List list = new ArrayList(); list.add(person1); //out.println("Arraylist has " +list.size()+ " objects"); for (Iterator it = list.iterator(); it.hasNext();){ Person person =(Person)it.next(); out.println(person.getFirstName()); out.println(person.getSurname()); out.println(person.getSex()); out.println(person.countryType()); } Unfor tunately it seems that only last record inserted in form.html is added to the list as the result.jsp displays only this last record. Can you help me please. Best regards, Rafal Laczek ---------------------------------------------------- Pozbieraj treści ze swoich ulubionych stron w jednym miejscu! I napisz koniecznie, czy ci się spodobało! Internet od nowa: http://klik.wp.pl/?adr=http%3A%2F%2Fpozbierane.pl&sid=932 -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en