File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes bean not right Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "bean not right" Watch "bean not right" New topic
Author

bean not right

White brendan
Greenhorn

Joined: Jan 10, 2003
Posts: 6
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

Joined: Jan 10, 2003
Posts: 6
Sorry, the setContactNumber(String x) and other methods shouldn't be commented out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean not right