DAO
1public void Sign_up(String login_id,String name,String password,String birth_date,String adress,String personal_word) { 2 Connection conn =null; 3 try 4 { 5 conn = DBManager.getConnection(); 6 String sql = "insert into user(login_id,name,password,birth_date,adress,personal_word)values(?,?,?,?,?,?)"; 7 8 PreparedStatement pr = conn.prepareStatement(sql); 9 pr.setString(1,login_id); 10 pr.setString(2, name); 11 pr.setString(3, password); 12 pr.setString(4, birth_date); 13 pr.setString(5, adress); 14 pr.setString(6, personal_word); 15 16 int rs = pr.executeUpdate(); 17 System.out.println(rs); 18 pr.close(); 19 20 } catch (SQLException e) { 21 e.printStackTrace(); 22 } finally { 23 if (conn != null) { 24 try { 25 conn.close(); 26 } catch (SQLException e) { 27 e.printStackTrace(); 28 } 29 } 30 31 } 32 33 34 }
beans
1package beans; 2 3import java.io.Serializable; 4import java.util.Date; 5 6 7public class userbeans implements Serializable { 8 private int id; 9 private String login_id; 10 private String name; 11 private Date birth_date; 12 private String password; 13 private String adress; 14 private String personal; 15 public userbeans(String loginidData) { 16 17 } 18 19 20 public void userbeans1 (String login_id,String password) { 21 this.login_id = login_id; 22 this.password = password; 23 24 } 25 public userbeans (String name ,String personal_word) { 26 this.name = name; 27 this.personal = personal_word; 28 } 29 30 public userbeans(String name1, String personal_word1, int id1) { 31 32 this.name = name1; 33 this.personal = personal_word1; 34 this.id = id1; 35 } 36 37 38 39 40 public int getId() { 41 return id; 42 } 43 public void setId(int id) { 44 this.id = id; 45 } 46 public String getLogin_id() { 47 return login_id; 48 } 49 public void setLogin_id(String login_id) { 50 this.login_id = login_id; 51 } 52 public String getName() { 53 return name; 54 } 55 public void setName(String name) { 56 this.name = name; 57 } 58 public Date getBirth_date() { 59 return birth_date; 60 } 61 public void setBirth_date(Date birth_date) { 62 this.birth_date = birth_date; 63 } 64 public String getPassword() { 65 return password; 66 } 67 public void setPassword(String password) { 68 this.password = password; 69 } 70 public String getAdress() { 71 return adress; 72 } 73 public void setAdress(String adress) { 74 this.adress = adress; 75 } 76 public String getPersonal() { 77 return personal; 78 } 79 public void setPersonal(String personal) { 80 this.personal = personal; 81 } 82 83 84 85 86 87 public void Sign_up(String login_id2, String name2, String password2, String birth_date2, String adress2, 88 String personal_word) { 89 // TODO 自動生成されたメソッド・スタブ 90 91 } 92
jsp
1 2 <center> 3 <font size="8"> Sign up</font> 4 5 <form action="sign_up_confirm" method="post"> 6 7 <div class="cp_iptxt"> 8 <label class="ef"> 9 <input type="text" name = "login_id" placeholder="login_id"> 10 </label> 11</div> 12 <div class="cp_iptxt"> 13 <label class="ef"> 14 <input type="text" name = "name" placeholder="your name"> 15 </label> 16</div> 17 18 <div class="cp_iptxt"> 19 <label class="ef"> 20 <input type="text" name ="password" placeholder="password"> 21 </label> 22</div> 23 24 <div class="cp_iptxt"> 25 <label class="ef"> 26 <input type="text" name = "one more password" placeholder="one more password"> 27 </label> 28</div> 29 <div class="cp_iptxt"> 30 <label class="ef"> 31 <input type="text" name = "birth_date" placeholder="birth_date"> 32 </label> 33</div> 34 <div class="cp_iptxt"> 35 <label class="ef"> 36 <input type="text" name = "adress" placeholder="your adress"> 37 </label> 38</div> 39 <div class="cp_iptxt"> 40 <label class="ef"> 41 <label for="i_name">※パスワード再設定時に使用</label> 42 <div><label for="i_name">あなたの好きな食べ物は?</label></div> 43 <input type="text" name = "personal_word" placeholder="personal word"> 44 </label> 45</div> 46 47<p class="textright"><input type="submit" id="refine_search" value="Entry" class="btn btn-primary"></p> 48 </form> 49 </center> 50<span style="text-align: right"> 51<p><a href="login_page">戻る</a></p> 52</span> 53 54</body> 55
HTTPステータス 500 - javax.el.PropertyNotFoundException: Property 'login_id' not found on type DAO.usersDAO
と出てしまいます
すべてlogin_idにそろえているはずなのにエラーが出てしまいます
データベースには登録されますがどこの記述が間違っているのかがわかりません
教えていただけたら助かります
回答2件
あなたの回答
tips
プレビュー