SpringProyectDemo4
Autor: Daniel Pérez Pérez
Fecha: 28/08/2022
Demonstration of how you can capture the starting events of the application, creation of the user session and destruction of the user's session.
Note: The org.springframework. So to execute this project you must do it with Apache Tomcat 9 since Apache Tomcat 10 implements the new Jakartaee structure.
If you want to create web applications with Spring about Apache Tomcat 10 it is better that you use Spring Boot. (Locate my repositories on web applications with Spring Boot 3).
Development Environment: Eclipse, Version: 2022-03 (4.23.0) Server: Apache Tomcat, Version: 9 JDK: OpenJDK, Version: 17.1 Project Manager: Maven, Version: 3.8.0 Maven artifact id
Spring Framework: Web Spring MVC V.5.3.22
Javax Servlet: V.4.0.1
1st. Copy the Board of Directors with the Code in the Board of Directors of your Eclipse Work Space. 2nd. From eclipse, import the project by clicking on File -> Open Projects from File System 3rd. In Import Source, clicking on the "Directory ..." button select the folder that contains the project. 4th. Click on Finish 5th. It is recommended to make a maven update (right click on the MAVEN -> Update Project ...
For the analysis of this project, it is recommended to follow the following order, which almost coincides with the order that has been followed to configure and implement this project and then indicated:
1st Creation of the Maven Project with Artigact ID: Maven-Archetype-Webapp (and elimination of the .JSP file that appears by default).
2nd Modification of the Pom.XML file - Adapt the version of the JDK by modifying and establishing the Maven.compiler.Source and Maven.compiler.target.
3rd Modification of the Web.XML deployment file by adding the DEN Servlet configuration that will execute the main spring container and indication of the .XML of the Spring container configuration relative to the user requests (session-conntext.xml) and the relative to the context of the application (APP-Context.xml). Note that the version of the web.xml scheme is the 4.0 which must coincide with the version of the Dinamic Web Project facet on project properties. Check that in the Project Projects the Dinamic Web version Sea 4.0 version and in Java Build Path Figure Maven's units as a check.
4th creation of the /Web-inf/session-context.xml file that contains the spring container configuration related to customer requests.
5th Creation of the /WeB-Inf/app-context.xml file containing the Spring container configuration related to the application context.
6th creation of resources directories:/SRC/MAIN/webapp/IMG,/SRC/Main/Webapp/Styles and/SRC/Main/Webapp/Web-Inf/Views and its resources.
7th Creation of the classes contained in the ES.DSW.Events package
8th creation of the classes contained in the ES.DSW.Controllers package
Note: Analyze each of the examples provided in this project.