hi!
you probably call your beans method which was designed and implemented for
that purpose.
sth. like this:
User user = new User();
user.setUserName(loginid);
if (theUserValidatorBean.validate(user))
dosth...
else
dosthelse
in UserValidatorBean you eighter have a list (or a map, or...) to find out
whether the user with the given userid exists on your system, or you connect
to a database to check that, or you parse a file, or your Bean has
functionality implemented which makes it possible for it to call you via
telephone and ask whether this user should be allowed to log in or not...
btw, you can find out if the username is null and more then "" with
(userid!=null && !"".equals(userid)).
-mw
----- Original Message -----
From: "Shyamal Bhowmik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 6:01 AM
Subject: help
i have the following code
<%@ page import="java.sql.*,java.util.*,java.lang.*,users.*" %>
<jsp:useBean id="user" scope="session" class="users.uservalidity"/>
<%
try
{
session=request.getSession(false);
String loginid=(String)session.getValue("username");
user.setUserName(loginid);
if(!(user.validateUser()))
{
response.sendRedirect("user.jsp");
%>
<%
}
else
return ;
now if i want to access the loginid ina bean which checks whether the
username is null or not how do i accomplish this
please help someone i am just a starter in this field
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html