I'm receiving the error below when i try to execute a simple login
application

null
java.lang.NullPointerException
        at test.struts.LoginBean.validate(LoginBean.java:30)
        at test.struts.LoginAction.perform(LoginAction.java:20)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)

What occur is that my LoginAction Servlet instance a validate LoginBean and
execute its Validate method passing for it
the Request object (it's a normal process), depending
about  validated condition processed by  LoginBean  it can to return a null
ActionError object, like in that piece of code below, but
itsn't seems ok.


In the LoginAction class

     LoginBean lb = new LoginBean();
     request.setAttribute("LoginBean",lb);
     lb.setParameteres(request);

     ActionErrors ae = lb.validate();            <--  I got error here!
(null value not accept!?)
     request.setAttribute(Action.ERROR_KEY, ae);
     
     if (ae==null || ae.size() == 0 )
     {
           return mapping.findForward("valid");    
    }
    else
    {
          return mapping.findForward("invalid");
    }
     
--- end code
any idea ?
Thanks in advance
          

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to