This is the legacy version of the Todo application, demonstrating an older 'legacy' Java web application practices and common antipatterns.
- Create, read, update, and delete todo items
- Filter todos by status (All, Active, Completed)
- Sort by creation date (Newest First, Oldest First)
- Track creation and completion timestamps for todos
- Responsive web interface
- Technical overview page
- Java 8 or higher
- Maven 3.x
../run-legacy.sh runThe application will be available at: http://localhost:8080/legacy-todo
../run-legacy.sh debugThen in VS Code:
- Set breakpoints in your code
- Select "Debug Legacy Todo" configuration
- Press F5
Client Layer (Browser)
│
▼
Presentation Layer (JSP)
│ - index.jsp: Main UI
│ - about.jsp: Technical overview
│
▼
Controller Layer (Servlets)
│ - TodoServlet: Handles all CRUD operations
│
▼
Service Layer
│ - TodoStorage: File-based storage service
│
▼
Model Layer
│ - Todo: Data model for todo items
│
▼
Storage Layer
│ - File System Storage (data/tasks.json)
- File System Dependencies: Direct file system access, hard coded paths, local file locking
- Local Caching: Non-distributed cache, file system persistence, no cache coordination
- Configuration Management: Properties files, hard coded values, no environment separation
- Logging Practices: File-based logging, local log rotation, no structured logging
- Code Style Issues: Inconsistent import ordering, missing documentation, non-standard formatting
- Local File Storage: Tasks stored in
data/tasks.jsonwith direct file system access and no transaction support - Embedded Cache: Local in-memory EhCache with disk persistence in
data/cache/ - Local File System Logging: Logs written to
data/app.logwithout rotation or centralization - Local Configuration: Property files in
src/main/resourceswith hard coded paths
- Runtime: Java 8+, JSP 2.3.3, Servlet API 3.1.0
- Build: Maven 3.x
- Dependencies: JSTL 1.2, EhCache 2.10.6, Jackson 2.15.3, SLF4J/Logback
- Quality Tools: Maven Checkstyle Plugin with Google Java Style Guide
legacy-todo/
├── src/
│ └── main/
│ ├── java/ # Java source files
│ ├── resources/ # Configuration files
│ └── webapp/ # Web resources and JSP pages
├── data/ # Runtime data directory
│ ├── tasks.json # Todo items storage
│ ├── cache/ # EhCache storage
│ └── app.log # Application logs
├── pom.xml # Maven configuration
└── checkstyle.xml # Checkstyle configuration