How shashwat-kotiyal/water-hmi works
Purpose and Delivery
Water-HMI is a Java web application for a water-distribution HMI: user login, telemetry indication/measurand views, tank visualization, alarms, reports, and session/cache pages. It is packaged as a deployable WAR for a servlet container.
• dist/WATERv3.war
• build.xml
• WATER_DISTRUBUTION_SYS_DBv2.0.SQL
Runtime Entry Surface
The application enters through JSP pages and servlet mappings declared by the web deployment descriptor. Login is the apparent initial authentication surface; operational pages provide the HMI dashboard and telemetry screens.
• web/WEB-INF/web.xml
• web/login.jsp
• web/wdsys.jsp
• web/wtp.jsp
Authentication and Session Boundary
Login is split into request handling, action orchestration, operation/business logic, and a login bean. Logout has its own servlet handler, while JSP pages expose session and cache-management functionality. Authentication/session state is the boundary controlling access to operational views.
• src/java/com/servlet/LoginHandler.java
• src/java/com/action/LoginAction.java
• src/java/com/Operation/LoginOperation.java
• src/java/com/servlet/LogoutHandler.java
• web/SessionManager.jsp
Telemetry Processing Pipeline
Telemetry is organized into two parallel flows: tele-indications and tele-measurands. Each flow has a servlet handler for incoming/request processing, an action layer, an operation layer, and a view servlet for rendering/query results. Shared telemetry state is represented by TelBeans.
• src/java/com/servlet/TeleIndicationHandler.java
• src/java/com/action/TeleIndicationAction.java
• src/java/com/Operation/TeleOperation.java
• src/java/com/servlet/ViewTeleInd.java
• src/java/com/servlet/TeleMeasurandHandler.java
• src/java/com/bean/TelBeans.java
HMI Presentation Layer
JSP pages are server-rendered operational screens, supported by client-side JavaScript and CSS. The HMI includes telemetry pages, an alarm screen, reporting, and a dynamic water/tank visualization endpoint.
• web/Tele_indication.jsp
• web/Tele_measurand.jsp
• web/Alarm.jsp
• web/Report.jsp
• src/java/com/servlet/DynamicTank.java
• web/water.js
Persistence and Infrastructure
The application uses a MySQL database, with schema/setup SQL supplied in the repository. Java database access is centralized through a connection component; the MySQL Connector/J driver is bundled in the built web artifact. Deployment metadata includes a GlassFish-specific descriptor, indicating GlassFish compatibility.
• src/java/com/connection/MyConnection.java
• WATER_DISTRUBUTION_SYS_DBv2.0.SQL
• build/web/WEB-INF/lib/mysql-connector-java-5.1.13-bin.jar
• build/web/WEB-INF/glassfish-web.xml
Build Artifact Boundary
Source lives under src/java and web assets under web; generated deployment output is represented under build/web and distributed as the WAR. Changes should target source directories rather than generated build output.
• src/java/com
• web/WEB-INF/web.xml
• build/web/WEB-INF/web.xml
• dist/WATERv3.war
Main entry points: wdsys.jsp Operational HMI pages · Tele_indication.jsp Telemetry views · TeleOperation.java Telemetry operation · web.xml Servlet mappings
Components 20
HMI Presentation
Server-rendered operational screens and client behavior.
- Servlet mappings · Declares JSP and servlet runtime entry points.
web/WEB-INF/web.xml - Login page
web/login.jsp - Operational HMI pages · Dashboard, telemetry, alarm, and report views.
web/wdsys.jsp - Telemetry views
web/Tele_indication.jsp - Dynamic tank view · Provides dynamic water and tank visualization.
src/java/com/servlet/DynamicTank.java - HMI client script
web/water.js
Authentication & Session
Login orchestration and access-state boundary.
- Login handler
src/java/com/servlet/LoginHandler.java - Login action
src/java/com/action/LoginAction.java - Login operation
src/java/com/Operation/LoginOperation.java - Logout handler
src/java/com/servlet/LogoutHandler.java - Session manager · Exposes session and cache management.
web/SessionManager.jsp
Telemetry Pipeline
Parallel indication and measurand processing.
- Tele-indication flow · Handles tele-indication requests.
src/java/com/servlet/TeleIndicationHandler.java - Tele-measurand flow · Handles tele-measurand requests.
src/java/com/servlet/TeleMeasurandHandler.java - Telemetry operation · Shared telemetry processing layer.
src/java/com/Operation/TeleOperation.java - Telemetry state · Shared tele-indication and measurand state.
src/java/com/bean/TelBeans.java - Telemetry result view · Renders or queries tele-indication results.
src/java/com/servlet/ViewTeleInd.java
Persistence & Deployment
Database access, packaging, and servlet-container deployment.
- Database connection · Centralizes Java database access.
src/java/com/connection/MyConnection.java - Water distribution DB · Database schema and setup script.
WATER_DISTRUBUTION_SYS_DBv2.0.SQL - Deployable WAR · Deployable application package.
dist/WATERv3.war - GlassFish deployment · GlassFish-specific deployment metadata.
build/web/WEB-INF/glassfish-web.xml
Connections 22
- Servlet mappings → Login page: routes to
- Servlet mappings → Operational HMI pages: routes to
- Login page → Login handler: submits credentials
- Login handler → Login action: delegates
- Login action → Login operation: orchestrates
- Login operation → Database connection: authenticates via
- Logout handler → Session manager: clears access state
- Session manager → Operational HMI pages: controls access to
- Operational HMI pages → Telemetry views: navigates to
- Telemetry views → Tele-indication flow: requests indications
- Telemetry views → Tele-measurand flow: requests measurands
- Tele-indication flow → Telemetry operation: processes
- Tele-measurand flow → Telemetry operation: processes
- Telemetry operation → Telemetry state: updates
- Telemetry operation → Database connection: reads and writes
- Telemetry state → Telemetry result view: supplies results
- Telemetry result view → Telemetry views: renders
- Operational HMI pages → Dynamic tank view: loads visualization
- HMI client script → Dynamic tank view: drives dynamic display
- Database connection → Water distribution DB: connects to
- Deployable WAR → GlassFish deployment: deployed with
- Deployable WAR → Servlet mappings: packages web application