Pointers 当i';我正在将数据从jsp发送到servlet

Pointers 当i';我正在将数据从jsp发送到servlet,pointers,exception,null,Pointers,Exception,Null,在运行代码时,我总是遇到这种异常 if((UDID)!=null && action.equalsIgnoreCase("insert")){ // null pointer exception int id = Integer.parseInt(UDID); UserBean user = new UserBean(); user.setUserdetailid(id); us

在运行代码时,我总是遇到这种异常

          if((UDID)!=null && action.equalsIgnoreCase("insert")){ // null pointer exception 
          int id = Integer.parseInt(UDID);
          UserBean user = new UserBean();
          user.setUserdetailid(id);
          user.setUserid(id);
声明:

action.equalsIgnoreCase("insert")

如果action==null,则将引发nullpointerexception,因为您无法对未分配的变量调用equalsIgnoreCase方法。

action为null?可能与Where is
action
assigned重复?显然不存在。@KillerDeath正确。请检查您的操作。它可能是空的