http://xmlns.jcp.org/xml/ns/javaee/web-app_3_0.xsd"version="3.0"><welcome-file-list><welcome-file>/MyFirstServlet</welcome-file></welcome-file-list><servlet><servlet-name>MyFirstServlet</servlet-name><servlet-class>com.howtodoinjava.servlets.MyFirstServlet</servlet-class></servlet><serv...
Since your @SpringBootApplication annotation is in com.example.demo, and no basePackage is defined for scanning, it will only scan that package and its nested packages. The easiest way to solve this is to move your controller package. From this: . └── main ├── java │ └── com...
In this example, we are validating the password entered by the user. If password is servlet, it will forward the request to the WelcomeServlet, otherwise will show an error message: sorry username or password error!. In this program, we are cheking for hardcoded information. But you can che...