How avocount/altoroj-mytest works
Main Components
• Client Interface: Show the browser (or client) initiating requests to the application. Include different entry points such as the main login pages, admin pages, and REST API endpoints.
• Web Server & Servlet Container: Represent the Tomcat 7 server that hosts this application. Indicate that it serves dynamic JSP pages from the “WebContent” folder and static assets (CSS, images, SWF files, Swagger documentation).
• Frontend / Presentation Layer: Include JSP pages (and their associated fragments like header.jspf, footer.jspf, etc.) in the WebContent. Highlight directories like “bank”, “admin”, “static”, and “swagger” to show different areas of functionality.
• Application Layer (Controller): Represent the servlets and filters found in the Java source packages (under src/com/ibm/security/appscan/altoromutual). In particular, list the various servlets (LoginServlet, AccountViewServlet, AdminServlet, etc.) acting as controllers following an MVC pattern.
• Filters and Listeners: Indicate security and authentication filters (AdminFilter, ApiAuthFilter, AuthFilter) and the StartupListener which initializes the environment.
• Business Logic / Domain Model: Demonstrate the model classes (Account, Feedback, Transaction, User) that represent the core business concepts as well as the utility classes (DBUtil, OperationsUtil, ServletUtil) that support processing.
• Data Layer: Illustrate the database component (Apache Derby) where all persistent banking data is stored. Emphasize that it is automatically set up at first login based on the application’s configuration.
• REST API Component: Clearly note the existence of a fully documented REST API (using Swagger files in WebContent/swagger), which allows third parties or advanced users to interact with the system through API calls.
Relationships and Interactions
• Optionally, denote configuration and initialization flows—from the StartupListener reading the properties file (WEB-INF/app.properties) to configuring application parameters.
Architectural Patterns and Design Choices
• MVC pattern used implicitly in the application: JSPs (view), servlets (controller), and Java model classes (model).
• Security components via filters and custom authentication (e.g., ApiAuthFilter) to demonstrate access control flows.
• Point out the use of standard Java EE practices (JSP, Servlet, and listeners) rather than using high-level frameworks, which supports the educational purpose of showing raw, “vulnerable” code for learning.
Relevant Technologies/Frameworks
• Java EE (Servlets, JSP, etc.)
• Apache Derby as the SQL database.
• Gradle as the build tool (with build.gradle in the root).
• Tomcat 7 as the application server.
• Swagger for REST API documentation.