Mary,
I do something like this
In the loginBean, I have a method isDataMissing() which checks if username,
password are not null, if something is missing I just return a string saying
what was missing or if not missing I return something like "ok" (you can
also use boolean, I do it this way because in my other query screens I
actually return back the fields that were missing)
so in ur JSP, before you call authenticate(), call isDataMissing() and if it
returns OK then call authenticate else (in my case) I display the fields
that are missing...
<% if (loginBean.isDataMissing().equalsIgnoreCase("ok")){
// Nothing is missing
//call authenticate()
loginBean.authenticate();
}
else{
// display an Error Message...
}
%>
Hope it helps
Asim Imam
Application Developer
@AT&T Tax Systems Group
-----Original Message-----
From: Wong Mary [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 05, 1999 1:16 PM
To: [EMAIL PROTECTED]
Subject: starting request processing after setting bean properties
Hello,
What is the appropriate way to invoke request processing on a jsp after all
the bean
properties have been set?
For example:
class LoginBean
{
String username; // mapped to input on jsp
String passwd; // mapped to input on jsp
String success; // mapped to some value in jsp
public void setUsername(String _username) {...}
public void setPasswd(String _passwd) {...}
public void authenticate() { // check username and passwd against db }
};
How would one go about specifying the invocation the authenticate() in the
jsp so that it is done after usename and passwd are set from the parameters
in the request?
Thanks,
-Mary
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html