This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean not right

 
White brendan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am getting the following error when requesting a .jsp:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: com.eclinck.web.UserBean.setID(Ljava/lang/String V
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
I can find absolutely no reason for this problem. Here is my code (first the .jsp segment)
statement = connection.getConnection().createStatement();
result = statement.executeQuery(sql);
if (result.next()) {
System.out.println("User Found in db");
user.setUserName(result.getString("username"));
user.setEmail(result.getString("email"));
user.setPassword(result.getString("password"));
user.setCompanyName(result.getString("name"));
//user.setContactNumber(result.getString("contact_number"));
//user.setID(result.getString("token_owner_id"));
//user.setCountry(result.getString("country"));
//user.setAddress(result.getString("address"));
//user.setCity(result.getString("city"));
//user.setState(result.getString("state"));
//user.setZip(result.getString("zip"));
user.setLogged(true);
response.sendRedirect("profile.jsp");
}
It is only at the setContactNumber() method, and any method thereafter that the error occurs. The bean code is right, with all the methods set(x) accepting String parameters. Even when I hard code string (instead of retrieving from db) I still get the same error on any method except the first four.
any help would be appreciated
thx
brendan
 
White brendan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, the setContactNumber(String x) and other methods shouldn't be commented out
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic