How carlxsmedina/proyectoprg4 works
Project Type & Purpose
• This is a monolithic Java web application (“Sistema de Gestión de Usuarios”) that provides full CRUD and authentication over user records.
• Built with JSP for the front-end views, a single Java DAO class for persistence, and MySQL as the backing store. Deployed on Apache Tomcat.
File‐Structure Analysis
• Top‐Level:
• build.xml + nbproject/ → Ant build + NetBeans metadata
• src/conf/MANIFEST.MF → WAR metadata
• src/java/datos/Conexion.java → JDBC‐based Data Access Object
• web/ → JSP pages under the web content root
– web/META-INF/context.xml → JNDI or resource configuration
– JSPs: login.jsp, index.jsp, agregarUsuario.jsp, buscar.jsp, confirmar.jsp
• No separate “controllers” folder—JSPs likely embed both view and controller logic.
Key Architecture Points from README
• Layers: Presentation (JSP + Bootstrap), Persistence (JDBC via Conexion.java)
• Tech stack: Java 8+, JSP/Servlet container (Tomcat 8.5+), MySQL 5.7+, Bootstrap 5
• DB auto‐creation on first run, connector jar in WEB-INF/lib
Main Components
a. Presentation Layer
• Browser (Chrome/Firefox)
• HTTP(S) frontend → JSPs (login, index, register/edit, search, confirm)
b. Application Server
• Tomcat Container
• JSP Engine + Servlet API
• Ant (build.xml) / NetBeans deployment
c. Business/DAO Layer
• src/java/datos/Conexion.java
• Manages JDBC connections, executes SQL for CRUD
d. Database Layer
• MySQL Server (sistema_usuarios schema, usuarios table)
• JDBC Driver (mysql-connector-java.jar)
e. Infrastructure/Config
• context.xml (JNDI DataSource or resource-ref)
• build.xml / project.properties (build & deploy steps)
Relationships & Data Flows
• ① HTTP Request: Browser → Tomcat
• ② JSP invokes Conexion.java methods (via scriptlet or custom tag)
• ③ JDBC Call: Conexion → MySQL
• ④ Query Results: MySQL → Conexion → JSP
• ⑤ HTTP Response: JSP → Browser
Architectural Patterns & Principles
• Layered Pattern (Presentation → Business/DAO → Data)
• Implicit MVC: JSPs double as View + Controller, DAO as Model
• Use of resource configuration (context.xml) for decoupling DB creds
Final Checklist
• Call out configuration artifacts (context.xml, build.xml)
• 5 JSP pages as view endpoints or group them logically