How apache/struts-examples works
This repository is a collection of independent Apache Struts tutorial applications, not one integrated product. Users explore examples demonstrating framework features; each application’s request handling and result depend on its own Struts configuration and web pages, which are not shown here. The graph highlights the CRUD example’s service/DAO layer and the custom expression-cache factory, plus representative tutorial feature areas from the tree. Source excerpts are limited, so most example-to-example or UI-to-action relationships are intentionally not asserted.
Main entry points: DefaultPersonService.java Person service · CustomOECFactory.java Cache factory · MemoryPersonDao.java Person DAO · MemoryPersonSupportDao.java Lookup DAO
Components 24
CRUD Example
- Person actions
crud/src/main/java/org/apache/struts/crud/action/PersonAction.java - Person service
crud/src/main/java/org/apache/struts/crud/service/DefaultPersonService.java - Person DAO
crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonDao.java - Lookup DAO
crud/src/main/java/org/apache/struts/crud/dao/MemoryPersonSupportDao.java - Person model
crud/src/main/java/org/apache/struts/crud/model/Person.java - Country model
crud/src/main/java/org/apache/struts/crud/model/Country.java
Framework Features
- Cache factory
expression-cache/src/main/java/org/apache/struts/cache/CustomOECFactory.java - Expression cache
expression-cache/src/main/java/org/apache/struts/cache/CustomOEC.java - LRU cache
expression-cache/src/main/java/org/apache/struts/cache/CustomOELRUC.java - Localized text
text-provider/src/main/java/org/apache/struts_example/WildcardLocalizedTextProvider.java - Unknown handler
unknown-handler/src/main/java/org/apache/strutsexamples/web/TilesUnknownHandler.java
Forms And Validation
- Edit action
bean-validation/src/main/java/org/apache/struts/edit/action/EditAction.java - Edit service
bean-validation/src/main/java/org/apache/struts/edit/service/EditServiceInMemory.java - Edit model
bean-validation/src/main/java/org/apache/struts/edit/model/Person.java - Registration action
form-processing/src/main/java/org/apache/struts/register/action/Register.java - Registration model
form-processing/src/main/java/org/apache/struts/register/model/Person.java
Web Examples
- Angular app
rest-angular/src/main/webapp/js/app.js - Order controllers
rest-angular/src/main/webapp/js/controllers/OrdersController.js - Data service
rest-angular/src/main/webapp/js/services/DataService.js - Hello-world action
helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java - Message store
helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java - Chained action A
action-chaining/src/main/java/org/apache/struts_examples/ActionA.java - Chained action B
action-chaining/src/main/java/org/apache/struts_examples/ActionB.java
Other components
- Tutorial user
Connections 4
- Person service → Person DAO: delegates CRUD
crud/src/main/java/org/apache/struts/crud/service/DefaultPersonService.java - Person service → Lookup DAO: gets lookups
crud/src/main/java/org/apache/struts/crud/service/DefaultPersonService.java - Cache factory → Expression cache: creates cache
expression-cache/src/main/java/org/apache/struts/cache/CustomOECFactory.java - Cache factory → LRU cache: creates cache
expression-cache/src/main/java/org/apache/struts/cache/CustomOECFactory.java