i am trying to learn about servlet from a tutorial I use intellij and this is the structure of the default project project structure
when i try to send a request to the
HelloServlet
i get this error
error
this is the structure of the servlet HelloServlet and this is the pattern of the servlet in web.xml file
<servlet>
<servlet-name>home</servlet-name>
<servlet-class>com.example.HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>home</servlet-name>
<url-pattern>/home</url-pattern>
</servlet-mapping>
the project contain only what I did mention before and this the URL that I am using to request the servlet
http://localhost:8080/demo2_war_exploded/home
also the init()
function does not get executed