• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bean not right

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, the setContactNumber(String x) and other methods shouldn't be commented out
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic