Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: problem in setting the bean properties via recordset


Message #1 by "Ankur Chanana" <anks_77@r...> on Wed, 7 Nov 2001 13:10:05
This is with reference to the Technical Support application example given 
in your book titled -Java Server Programming J2EE edition volI-wrox.Please 
refer (pgnos-520)to the same in chapter JSP Basics and Architecture.In 
TechSupportBean the beans properties like firstName,lastName etc have been 
additionally set in case the customer is already a registered one.This has 
been done using the recordset getString() method as an argument to 
setFirstName etc properties of the bean.

I have been trying to incorpoate the above thing in my project which is an 
emailfinder.It consists of the following files..
1 MapBean.java--------
2 email.jsp----form for new users.
3 lookup.jsp---to search for an email-id.
4 lookupresponse.jsp---response page for the lookup.jsp file in case the 
email-id match is found.This page is used to show other details in match 
with the email-id entered in lookup.jsp.

The problem is that whenever i put an existing email in lookup.jsp the 
page no doubt goes to lookupresponse.jsp but it shows only the email entry 
from the bean properties and not others like password etc.
I have followed the same set of code to set the properties of bean
.....if(rs.next()){
....setTname(rs.getString("NAME"))
.....setPass(rs.getString("PASS"))
.........
It shows an error at times of Invalid Descriptor Index along with some SQL 
Driver error.
My database is with SQL server 7.0
I am using tomcat to run the application.
Everything else is going fine in the program except setting up of the bean 
properties as above explained.

If posiible for you Sir please guide me to solve the above problem.I shall 
be grateful to you.

Waiting for a reply.
With Regards

Ankur Chanana

  Return to Index