Servlet.service () for servlet Userservlet threw exception java.lang.NullPointerException null pointer exception

Source: Internet
Author: User

Error Cash:

Critical: Servlet.service () for Servlet Userservlet threw exception
Java.lang.NullPointerException
At Com.liuyang.servlet.UserServlet.doGet (userservlet.java:17)
At Javax.servlet.http.HttpServlet.service (httpservlet.java:617)
At Javax.servlet.http.HttpServlet.service (httpservlet.java:723)
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:290)
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206)
At Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:233)
At Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:191)
At Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:127)
At Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:103)
At Org.apache.catalina.valves.AccessLogValve.invoke (accesslogvalve.java:615)
At Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:109)
At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:293)
At Org.apache.coyote.http11.Http11Processor.process (http11processor.java:861)
At Org.apache.coyote.http11.http11protocol$http11connectionhandler.process (http11protocol.java:612)
At Org.apache.tomcat.util.net.jioendpoint$worker.run (jioendpoint.java:503)
At Java.lang.Thread.run (thread.java:662)

The error is that my front-end interface input values cannot be passed to the background, so the background cannot be retrieved.

Code positioning

To this line, but there is no error in this line, then the code associated with it, the value passed is the value of username, so find the statement about username, the back-end code in the compiler did not give an error, indicating that the fault is not the backend

So go to the front to find the problem.

Finally found to be

There was an error here, not $ but the & symbol, which caused the value to fail to pass.

Servlet.service () for servlet Userservlet threw exception java.lang.NullPointerException null pointer exception

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.