This is a simple Spring MVC web application that demonstrates the use of XML configuration and annotations to create a controller and configure the application.
This application is a basic example of a Spring MVC web application using XML configuration for the servlet and annotation-based controllers.
- Java JDK 8 or higher
- Maven
- Clone the repository:
git clone https://github.com/abhishekshah2905/spring-mvc-xml-demo.git
- Navigate to the project directory:
cd spring-mvc-xml-demo
- Build the project:
mvn clean install
-
Deploy the WAR file to a Servlet container (e.g., Apache Tomcat).
-
Access the application at http://localhost:8080
- he HomeController handles requests to the root URL ("/") and adds a message to the model.
- The JSP view (index.jsp) in the WEB-INF/pages directory is used to render the response.
- Modify the HomeController to handle different URLs or add more functionality.
- Update the view (index.jsp) to display different content or add additional pages.