Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: JSP servlet exception


Message #1 by "Steve Rioux" <riouste@b...> on Thu, 10 May 2001 17:51:42
what happens if genClientBean.getClientType() returns null?
Try seperating this out like:

if ( genClientBean != null )
    {
    String t = genClientBean.getClientType();
    if  (t != null && t.equalsIgnoreCase( "P" ) )
        {
        partClientBean = (PartClientBean) genClientBean;
        }
    }

With short circuiting, if t is null, the other side of && is not evaluated.
Which is where you might be getting that null pointer exception.


  Return to Index