update row in mysql table in jsp <p>i´m trying to update rows in <code>mysql table</code>, i´m using <code>html form</code> for data insertion. In html form attribute <code>value</code> i´m using an existing data from database.</p> <p>Edit.jsp</p> <pre><code>&lt;form action="Update.jsp"&gt; &lt;% Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root"); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("select u.login,i.name,i.surname,i.age,i.tel,i.email,a.street,a.town,a.zip,ul.name,t.name from users u join info i on i.user_id=u.user_id join user_level ul on ul.ulevel=u.ulevel join teams t on t.team_id=u.team_id join adress a on a.info_id=i.info_id where u.login='" + session.getAttribute("uzivatel") + "'"); while (rs.next()) { %&gt; &lt;div class="well well-large"&gt; &lt;font size="2"&gt;&lt;b&gt;Welcome, &lt;/b&gt;&lt;/font&gt;&lt;font color="RED"&gt;&lt;i&gt;&lt;%= session.getAttribute("uzivatel")%&gt;&lt;/i&gt;&lt;/font&gt;&lt;br&gt; &lt;b&gt;Name:&lt;/b&gt; &lt;input type="text" name="name" value="&lt;%= rs.getString(2)%&gt;"&gt;&lt;input type="text" name="surname" value="&lt;%= rs.getString(3)%&gt;"&gt; &lt;br&gt; &lt;b&gt;Age:&lt;/b&gt; &lt;input type="text" name="age" value="&lt;%= rs.getString(4)%&gt;"&gt;&lt;br&gt; &lt;b&gt;Telephone:&lt;/b&gt; &lt;input type="text" name="tel" value="0&lt;%= rs.getString(5)%&gt;"&gt;&lt;br&gt; &lt;b&gt;E-mail:&lt;/b&gt; &lt;input type="text" name="email" value="&lt;%= rs.getString(6)%&gt;"&gt;&lt;br&gt; &lt;b&gt;Adress:&lt;/b&gt; &lt;input type="text" name="street" value="&lt;%= rs.getString(7)%&gt;"&gt;&lt;input type="text" name="town" value="&lt;%= rs.getString(8)%&gt;"&gt;&lt;input type="text" name="zip" value="&lt;%= rs.getString(9)%&gt;"&gt;&lt;br&gt; &lt;b&gt;User level:&lt;/b&gt; &lt;%= rs.getString(10)%&gt;&lt;br&gt; &lt;b&gt;Team:&lt;/b&gt; &lt;%= rs.getString(11)%&gt;&lt;br&gt; &lt;input type="submit" name="Submit" value="Update" /&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>Update.jsp</p> <pre><code>&lt;% String name = request.getParameter("name"); String surname = request.getParameter("surname"); String age = request.getParameter("age"); String telephone = request.getParameter("tel"); String email = request.getParameter("email"); String street = request.getParameter("street"); String town = request.getParameter("town"); String zip = request.getParameter("zip"); try { Connection conn = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root"); Statement st1 = null; st1 = conn.createStatement(); System.out.println(session.getAttribute("uzivatel")); st1.executeUpdate("UPDATE users JOIN info ON users.user_id = info.user_id" + " JOIN adress ON info.info_id = adress.info_id" + "SET info.name = '"+name+"',info.surname = '"+surname+"'," + "info.age = '"+age+"',info.tel = '"+telephone+"',info.email = '"+email+"'," + "adress.street = '"+street+"',adress.town = '"+town+"',adress.zip = '"+zip+"'," + "WHERE users.login ='" + session.getAttribute("uzivatel") + "' "); response.sendRedirect("AdministrationControlPanel.jsp"); } catch (Exception e) { System.out.println(e.getMessage()); } %&gt; </code></pre> <p>When I pressed the Submit button, it redirected me to <code>Update.jsp</code> and nothing was changed.</p>