Web Applications Overview

From Commander4j

Commander4j includes three web applications that run on Apache Tomcat alongside the main desktop application. Each is deployed as a WAR file and communicates with the same database. They are designed primarily for use on mobile devices and tablets on the shop floor, where a full desktop installation is not practical.

Web Applications

c4j_web_react — Pallet Confirmation and Despatch

This is the primary shop-floor web application. It provides browser-based screens for operators using wireless barcode scanners or handheld devices.

Key functions:

  • Scanning SSCC barcodes to confirm pallet production against a process order
  • Creating and managing despatch records
  • Assigning pallets to a despatch and confirming shipment
  • Recording waste transactions
  • Viewing pallet information
  • Changing user passwords

The application uses a traditional servlet and JSP architecture. A single Process servlet handles all form submissions. Sessions time out after 60 minutes of inactivity.

Deployed as: c4j_web_react.war

c4j_web_WS — Quality Panel Web Interface

This application provides a REST API and browser-based interface for recording quality panel inspection results. It is designed for use by quality technicians and trained panellists on tablets.

Key functions:

  • Creating and managing panel sessions
  • Organising samples into trays
  • Recording graded results against each sample
  • Progressing panels through their lifecycle (Panel → Complete → Closed)

The application exposes a JSON REST API consumed by a browser front end. Results feed into the main Commander4j QM module and are visible in the desktop Results Analysis and Reporting screen.

Deployed as: c4j_web_WS.war

See also: Quality Panel Web Interface

c4j_web_Issue — Material Issue Validation

This application is intended to validate that operators issue the correct raw materials to a production line. It cross-checks scanned SSCCs against the Bill of Materials for the active process order, confirms the pick location, and records the transaction.

Key functions:

  • Scanning material pallets (SSCC) for issue to a process order
  • Validating material and location against the BOM
  • Recording returns of unused material
  • Viewing pallet information and transaction history

Note: This application has been developed but is not yet deployed in production. It is included here for reference.

Deployed as: c4j_web_Issue.war

Shared Configuration

All three web applications use a hosts.xml file (located in the application's xml/hosts/ directory within the deployed WAR) to define their database connections. This is the same format used by the Commander4j desktop and Setup4j. When updating database connection details, each web application's hosts.xml must be updated separately.

The Setup4j tool is used to create and maintain hosts.xml files. After editing, the updated file must be copied into the relevant folder inside each deployed WAR, and Tomcat restarted (or the application reloaded) for the change to take effect.

Relationship to the Desktop Application

The web applications share the commander4j.jar library with the desktop application. This library provides the full database access layer, business logic, barcode utilities, and configuration handling. The web applications do not duplicate this logic — they call into the shared library directly.

All data written by the web applications is immediately visible in the desktop application, and vice versa. There is no synchronisation step.

Requirements

  • Apache Tomcat 11.x
  • Java 21
  • A configured and accessible Commander4j database (MySQL, MS SQL Server, or Oracle)
  • A valid hosts.xml deployed with each WAR

See also: Installation, Setup4j, Production Confirmation, Despatch, Quality Panel Web Interface