回覆列表
  • 1 # Affgcff

    是你的變數未去到值。request.setCharacterEncoding("GBK");5: String sQQnumber,sPassword,sNickname,sPetname;6: sQQnumber=request.getParameter("QQnumber");7: sQQnumber=sQQnumber.replaceAll(""","""");8: sPassword=request.getParameter("password");9: sPassword=sPassword.replaceAll(""",""");10: sNickname=request.getParameter("nickname");修改為:request.setCharacterEncoding("GBK");5: String sQQnumber,sPassword,sNickname,sPetname;6: sQQnumber=request.getParameter("QQnumber");7: sQQnumber=sQQnumber==null?"":sQQnumber.replaceAll(""","""");8: sPassword=request.getParameter("password");9: sPassword==sPassword=null?"":sPassword.replaceAll(""",""");10: sNickname=request.getParameter("nickname");先判斷是否為null,在進行操作。NullPointerException 異常 說明你在程式中對null值進行了操作。

  • 中秋節和大豐收的關聯?
  • 燕子和小鳥這篇短文是按照什麼順序來寫的這樣的詞語有哪些?