Skip to content

Conversation

@anamitraupadhyay
Copy link

This class demonstrates the use of RoutingHandler to handle GET and POST requests at the /greet endpoint, along with a fallback 404 handler.
Jira: https://issues.redhat.com/browse/UNDERTOW-2660

Summary: Adds a standalone example class (RoutingServer) under the examples module demonstrating RoutingHandler usage:-

GET /greet
POST /greet (reads request body)
Fallback 404 for unmatched paths
Details:

Example-only; no Undertow core changes
Includes current-year Apache 2.0 license header
Uses UndertowExample annotation for discovery via Runner

Open to relocating the example if maintainers prefer a different module/path
Tests: Not applicable for examples; existing RoutingHandler tests already validate handler behavior

Backwards compatibility: No API changes; no performance or security impact

@anamitraupadhyay
Copy link
Author

7 commits are already squashed into 1 commit

@baranowb baranowb added enhancement Enhances existing behaviour or code waiting PR update Awaiting PR update(s) from contributor before merging waiting CI check Ready to be merged but waiting for CI check waiting peer review PRs that edit core classes might require an extra review labels Nov 17, 2025
@baranowb
Copy link
Contributor

@anamitraupadhyay - could you please update commit messages to include [UNDERTOW-2660] as prefix ?

Copy link
Contributor

@baranowb baranowb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need proper prefix in commit message.
Also, those commits can be squashed into one?

SIDE NOTE: for some reason examples/src/main/java/io/undertow/examples/routing server/RoutingHandler.java but package is defined as io.undertow.eaxmples.routing - also file path/package has whitespace in it.

@anamitraupadhyay
Copy link
Author

anamitraupadhyay commented Nov 17, 2025

Need proper prefix in commit message.
Also, those commits can be squashed into one?

SIDE NOTE: for some reason examples/src/main/java/io/undertow/examples/routing server/RoutingHandler.java but package is defined as io.undertow.eaxmples.routing - also file path/package has whitespace in it.

All are fixed

@anamitraupadhyay anamitraupadhyay force-pushed the UNDERTOW-2660-routinghandler-example branch from f494e51 to ccf8851 Compare November 17, 2025 12:35
@baranowb baranowb self-requested a review November 27, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhances existing behaviour or code waiting CI check Ready to be merged but waiting for CI check waiting peer review PRs that edit core classes might require an extra review waiting PR update Awaiting PR update(s) from contributor before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants