# Getting Started

## What This Project Does
This repository is a fixture codebase for XML- and JSP-oriented static analysis. It contains small, focused examples of web deployment descriptors, JSF configuration, Java backing classes, and configuration-only XML so engineers can see how different patterns are represented.

If you are new here, think of the project as a catalog of “what to detect” rather than a production application. The files are intentionally minimal and often demonstrate one pattern per fixture.

## Recommended Reading Order
1. **Start with the manifest**: [ _manifest.json](../_manifest.json) to understand the available fixtures and where each example lives.
2. **Read the full example first**: [full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml](../full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml) alongside the matching Java classes in [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java) and [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java).
3. **Then scan the config variants**: [xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml](../xml-web-xml-multi-pattern/koptWebA/WebContent/WEB-INF/web.xml), [xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml](../xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml), and [xml-no-java-refs/src/config/pure-config.xml](../xml-no-java-refs/src/config/pure-config.xml).
4. **Finish with edge cases**: [xml-unresolved-fqn/src/config/external-refs.xml](../xml-unresolved-fqn/src/config/external-refs.xml), [xml-comment-with-class/src/config/commented-classes.xml](../xml-comment-with-class/src/config/commented-classes.xml), [xml-css-class-only/src/web/views/layout.xml](../xml-css-class-only/src/web/views/layout.xml), [xml-dtd-xsd-ref/src/config/schema-only.xml](../xml-dtd-xsd-ref/src/config/schema-only.xml), and [xml-malformed/src/config/broken.xml](../xml-malformed/src/config/broken.xml).

## Key Entry Points
These are the most useful files to understand first:

- [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java) — the primary example of a view logic class.
- [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java) — a simple JSF bean referenced from configuration.
- [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) — shows servlet filter wiring.
- [full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/listener/X33AppContextListener.java](../full-fixture-codebase/src/java/com/fujitsu/futurity/web/x33/listener/X33AppContextListener.java) — shows application listener registration.
- [full-fixture-codebase/src/java/javax/faces/webapp/FacesServlet.java](../full-fixture-codebase/src/java/javax/faces/webapp/FacesServlet.java) — the servlet entry point used by the web descriptors.

## Project Structure
The repository is organized as a set of self-contained fixtures:

- **`full-fixture-codebase/`** — the most complete end-to-end example, with Java classes plus web and view configuration.
- **`xml-*/` directories** — focused XML scenarios, each demonstrating a specific parsing or reference pattern.
- **`jsp-*/` directories** — JSP fixtures that show import patterns, `useBean`, fragments, and comment masking.
- **`_manifest.json`** — the index of all fixtures and their file lists.

Within each fixture, the layout usually mirrors a small web application: `src/` for Java or config inputs, and `WebContent/WEB-INF/` for deployment descriptors.

## Configuration
These are the main configuration files worth knowing:

- [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, JSF servlet, and application listener.
- [full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml](../full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml) — a smaller web descriptor showing the core servlet and filter wiring.
- [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) and [xml-build-excluded/src/config/real-config.xml](../xml-build-excluded/src/config/real-config.xml) — show that some files live alongside build metadata and should still be treated as real inputs.
- [xml-no-java-refs/src/config/pure-config.xml](../xml-no-java-refs/src/config/pure-config.xml) — a configuration-only example with no Java references.

## Common Patterns
A few conventions repeat throughout the fixtures:

- **Descriptor-driven wiring**: XML files often reference Java classes by fully qualified name rather than through code.
- **Small, isolated examples**: each file usually demonstrates one pattern, so it is safe to study them independently.
- **Comments matter**: some fixtures intentionally hide or preserve class names inside comments, so parsers should not assume comments are irrelevant.
- **Edge cases are first-class**: unresolved classes, schema-only XML, and malformed XML are included to test resilience.
- **Minimal implementations**: Java classes often contain only enough code to establish a symbol, bean, or servlet/filter relationship.

## Suggested First Hour
If you only have an hour, do this:

1. Open [full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml](../full-fixture-codebase/koptWebA/WebContent/WEB-INF/web-full.xml).
2. Jump to [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFLogic.java) and [full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java](../full-fixture-codebase/src/java/eo/web/webview/ACA001SF/ACA001SFBean.java).
3. Compare that flow with [xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml](../xml-faces-config/koptWebA/WebContent/WEB-INF/faces-config.xml).
4. Skim [xml-unresolved-fqn/src/config/external-refs.xml](../xml-unresolved-fqn/src/config/external-refs.xml) and [xml-comment-with-class/src/config/commented-classes.xml](../xml-comment-with-class/src/config/commented-classes.xml) to see the edge cases.
