Home  >  Q&A  >  body text

java - jsp实现登陆,字符串问题

伊谢尔伦伊谢尔伦2714 days ago552

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:02:28

    Is it empty because the user was not found?

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 17:02:28

    The error message contains the number of lines of code and a null pointer

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:02:28

    First of all, both of you are of type String, so if there is no combination of numbers and letters, there will be a null pointer. I don't see the implementation of dao from your code. It's hard to say. It may be that the value of username is not found in the database, so it is empty. Your judgment is not very rigorous. If you don’t fill in the password, a null pointer exception will occur

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:02:28

    Try password!=null

    reply
    0
  • Cancelreply