Posted By:
Mujtaba_Ahmed
Posted On:
Wednesday, September 25, 2002 01:15 PM
1. Can I use more than one bean in a jsp. 2. Login bean is associated with more than one jsp. It contains a username and password fields as strings. If I want to retrieve this username in the last jsp it's returning an empty string. How can I get the value of username which is entered in first jsp page, in the last jsp. Is it related to bean's scope? 3. I am getting an empty string i.e. 'finaldate' and I don't know why and how should I debug it's value. Here is the code which supposed to return a string with a date. ResultSet pq=stmt.executeQuery("select CURRENT_DATE"); if(pq.next()) idate=pq.getString("CURRENT_DATE"); finaldate=membean.calc(idat
More>>
1. Can I use more than one bean in a jsp.
2. Login bean is associated with more than one jsp. It contains a username and password fields as strings. If I want to retrieve this username in the last jsp it's returning an empty string. How can I get the value of username which is entered in first jsp page, in the last jsp. Is it related to bean's scope?
3. I am getting an empty string i.e. 'finaldate' and I don't know why and how should I debug it's value.
Here is the code which supposed to return a string with a date.
ResultSet pq=stmt.executeQuery("select CURRENT_DATE");
if(pq.next())
idate=pq.getString("CURRENT_DATE");
finaldate=membean.calc(idate2);
int rowsAffected=stmt.executeUpdate("insert into reserve(mem_id,book_id,startdate,lastdate) values('"+name+"','"+id+"','"+idate+"','"+finaldate+"')");
<<Less