When creating a web project in eclipse, an error is reported when creating a JSP or servlet file, as follows:
the error is: the superclass“ javax.servlet.http . httpservlet “was not found on the Java build path“ javax.servlet.http The. Httpservlet “class cannot be found in the project’s build path, that is, there is no class to send and receive requests.
If you look at the error reported by the servlet file:
is also the error caused by the lack of servlet related classes.
The specific solution is:
right click on the specific project — & gt; select Properties — & gt; select “Java build path”, and then follow the steps below:
Click next, select the server, click Finish
and then click “apply and close”.
Read More:
- maven_ Unable to create servlet file under Java Web project
- Spring boot project running error: Servlet.service () for servlet [dispatcherServlet] threw exception
- [Solved] SpringMVC Run Error: SEVERE-Servlet.service() for servlet jsp threw exception
- After eclipse eclipse eclipse imports the correct project, an error is reported in XML and other files
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p
- 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
- Solve the problem of failed to create the Java virtual machine when eclipse is opened
- The spring boot set appears in the stand-alone version of redis Servlet.service () for servlet [dispatcherServlet] in context with path [] thr
- Successful solution of eclipse startup error Error:Could not create the Java Virtual Machine Error:A fatal exception has occurred
- Fileexistserror: [winerror 183] cannot create a file when it already exists. File rename code attached
- Run Python file for the first time with eclipse / pydev: “UTF-8 ‘codec can’t decode byte 0xc4 in position
- Unknown error in eclipse POM file
- Eclipse .java File Syntax error, parameterized types are only available if source level is 1.5 or
- Exception of browser accessing servlet404
- [Solved] FTP Error: 553 Could not create file
- Eclipse: unable to open editor: no ID org.eclipse.jdt . ui.CompilationUnitEditor Editor descriptor for
- Fileexistserror: [winerror 183] cannot create a file when it already exists. : ‘D:/tjn/tra
- When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found
- FTP prompt in Linux — 553 could not create file (absolutely useful)