Java. Lang. NullPointerException The Servlet LoginServlet. DoPost (LoginServlet. Java: 43) Javax.mail. Servlet. HTTP. HttpServlet. Service (660) the HttpServlet. Java: Javax.mail. Servlet. HTTP. HttpServlet. Service (HttpServlet. Java: 741) Org, apache tomcat, websocket server. WsFilter. DoFilter (53) WsFilter. Java:
CodePudding user response:
Yes ah, 43
CodePudding user response:
There is a function inside the eclipse debug
CodePudding user response:
Server error,
CodePudding user response:
String name=request. The getParameter (" userName ")!=null? Request. The getParameter (" userName ") : ""; String name=request. The getParameter (" PWD ")!=null? Request. The getParameter (" PWD ") : ""; The above 2 lines replacing the try
CodePudding user response:
Sentenced to empty can try (null==name | | "". The equals (name))
CodePudding user response:
Use the StringUtils. IsBank (name)
CodePudding user response:
Request. The getParameter return originally is likely to be empty, the name and the PWD is likely to be null, use null. IsEmpty () must be submitted to the null pointer exception It is best to use StringUtils. IsBank (name) to null | | an empty string