# Getting Started

## What This Project Does
This repository is a fixture-style Java web application codebase used to exercise XML, JSP, and Java reference patterns. The important pieces are a JSF-style web layer, a request-encoding filter, and a small set of backing classes that are wired together through XML configuration.

If you are new here, focus on how the XML descriptors point to Java classes and how those classes support a simple view/bean flow.

## Recommended Reading Order
1. Start with this guide to understand the moving parts and where the code is organized.
2. Read the web application descriptors next: [`xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml`](xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml) and [`xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml`](xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml).
3. Then inspect the core Java entry points in [`full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java`](full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java), [`full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java`](full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java), and [`full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/filter/X33JVRequestEncodingSjisFilter.java`](full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/filter/X33JVRequestEncodingSjisFilter.java).

## Key Entry Points
The most useful classes to understand first are:
- [`eo.web.webview.ACA001SF.ACA001SFLogic`](full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java) — the main view logic class for the ACA001SF flow.
- [`eo.web.webview.ACA001SF.ACA001SFBean`](full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java) — the backing bean that holds view state.
- [`com.fujitsu.futurity.web.x33.filter.X33JVRequestEncodingSjisFilter`](full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/filter/X33JVRequestEncodingSjisFilter.java) — the request filter applied before requests reach the web layer.
- [`com.fujitsu.futurity.web.x33.listener.X33AppContextListener`](full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/listener/X33AppContextListener.java) — application lifecycle hook used during startup/shutdown.
- [`javax.faces.webapp.FacesServlet`](full-fixture-codebase/src/java/javax/faces/webapp/FacesServlet.java) — servlet entry point used by the JSF-style web configuration.

## Project Structure
At a high level, the repository is organized around fixture modules rather than one single application. The main areas you will encounter are:
- `src/java/...` — Java classes used by the examples and fixtures.
- `WebContent/WEB-INF/...` — deployment descriptors such as `web.xml` and `faces-config.xml`.
- `src/config/...` and `META-INF/...` — XML configuration fixtures that reference Java classes, schemas, or external resources.
- `jsp-*` and `xml-*` directories — focused examples that isolate specific parsing and reference scenarios.

A good mental model is: XML descriptors wire the app together, JSPs represent the view layer, and Java classes provide the backing behavior.

## Configuration
A few configuration files are especially important:
- [`xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml`](xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml) — registers the encoding filter, servlet, and application listener.
- [`xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml`](xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml) — maps managed beans to Java classes and scopes.
- [`xml-build-excluded/pom.xml`](xml-build-excluded/pom.xml) — Maven metadata for the excluded build fixture.
- [`xml-build-excluded/src/config/real-config.xml`](xml-build-excluded/src/config/real-config.xml) — a simple runtime config example that references a Java class.
- [`xml-unresolved-fqn/src/config/external-refs.xml`](xml-unresolved-fqn/src/config/external-refs.xml) — shows how unresolved external class references appear in config.
- [`xml-dtd-xsd-ref/src/config/schema-only.xml`](xml-dtd-xsd-ref/src/config/schema-only.xml) — demonstrates schema-only configuration with an external XSD reference.
- [`xml-no-java-refs/src/config/pure-config.xml`](xml-no-java-refs/src/config/pure-config.xml) — example config with no Java class references.

## Common Patterns
You will see the same patterns repeated across the repository:
- **XML-driven wiring** — classes are usually discovered through descriptors rather than hard-coded bootstrap logic.
- **Package-to-flow naming** — classes under `eo.web.webview.<FLOW>` typically belong to a specific screen or feature flow.
- **Thin behavior classes** — many Java classes are intentionally small, making the XML mapping more important than the implementation body.
- **Filter/listener startup hooks** — request filters and application listeners are used for cross-cutting setup.
- **Fixture-first examples** — several files are designed to illustrate edge cases such as unresolved references, commented-out class names, or schema-only configs.

## Quick Orientation Diagram
```mermaid
flowchart TD
A["Start Here"] --> B["Read web.xml and faces-config.xml"]
B --> C["Trace ACA001SFLogic and ACA001SFBean"]
C --> D["Review filters and listeners"]
```

## Practical Next Steps
- If you are debugging startup, begin with `web.xml` and follow the filter, servlet, and listener registrations.
- If you are tracing a screen flow, start from the managed bean in `faces-config.xml`, then jump to the matching `Logic` and `Bean` classes.
- If you are working on XML parsing or indexing behavior, compare the focused fixtures under `xml-*` to see how each edge case is represented.