* *
Error about creating a servlet when viewed in a browser
**
user initiates a request, which is received by the server, and finds out if the requested resource exists according to the configuration information in the web.xml file. If it does not exist, a 404 error is returned.
After the resource is found (the servlet is found), the servlet object is checked to see if it exists, if not, the object is created, and if it does, the corresponding processing method is executed.
After the execution of the processing method, the processing result will be returned to the Web server. After the Web server carries out relevant processing according to the result, it will be returned to the browser, and the browser will display the corresponding processing result.
————————————————
lution for link
Reasons for appearing:
In 404 because the
in the create project is not changed when buildpath WebContent/WEB – INF/classes
cause no class file
so error
Second, if there is no @WebServlet(“/test”) link, you should configure the web.xml file
in the WebContent/ web-inf directory
<servlet>
<servlet-name>xxx</servlet-name>
<servlet-class>day2ByServlet.Servlet$One</servlet-class>
<init-param>
<param-name>p</param-name>
<param-value>xixi</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>xxx</servlet-name>
<url-pattern>/Servlet$One</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>yyy</servlet-name>
<servlet-class>day2ByServlet.HttpServlet_two</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>yyy</servlet-name>
<url-pattern>/ServletTwo</url-pattern>
</servlet-mapping>
Read More:
- 404 error in browser accessing Servlet
- Possible causes and solutions of 404 problems in accessing servlet pages
- [Solved] SpringMVC Run Error: SEVERE-Servlet.service() for servlet jsp threw exception
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p
- Spring boot project running error: Servlet.service () for servlet [dispatcherServlet] threw exception
- Problems of accessing servlet display 404 on MyEclipse
- Chrome browser settings cause err when accessing the website_ FAILED
- 404 exception in servlet operation
- An error was reported when springboot connected to redis Servlet.service () for servlet [dispatcherServlet] in context with path [] threw e
- The solution to the problem that the method of interacting with database in the servlet class is invalid after the servlet submits 404, 500 refresh and becomes 404, and after connecting to the data pool
- The spring boot set appears in the stand-alone version of redis Servlet.service () for servlet [dispatcherServlet] in context with path [] thr
- Eclipse create servlet file error
- When idea writes JavaWeb, it can’t find servlet
- Servlet error: no interface expected here
- HTTP Status 500-Error instantiating servlet class problem solving
- Error 500: javax.servlet.ServletException : srve0207e: Solutions
- [spring] start error: nosuchmethoderror: javax.servlet.http . HttpServletResponse.getStatus () I
- Linux Tomcat accessing files on the server
- Servlet jump to JSP page 404 error
- When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found