Vert.x Web 4.5
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- Java 17109 lines · 4.4K tokens
- Vert.x Web 4.590 lines · 5.1K tokens
Total199 lines · 9.6K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 90
- 95
- 117
- 190
- 201
- 208
- 209
- 214
- 250
- 287
- 295
- 297
- 306
- 307
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 378
- 384
- 409
- 427
- 459
- 470
- 471
- 488
- 494
- 502
- 524
- 532
- 552
- 601
- 611
- 613
- 614
- 650
- 653
- 732
- 770
- 772
- 776
- 807
- 829
- 862
- 863
- 916
- 918
- 922
- 942
- 1004
- 1021
- 1275
Prompt Preview
Apply the Java 17 prompt first. Use these rules for Vert.x Web 4.5 and its optional Web modules on Java 17; they were checked against 4.5.33. Align every Vert.x module through the io.vertx:vertx-dependencies BOM, take Vert.x 4 maintenance releases as they ship, and plan migration before official Vert.x 4 maintenance ends in April 2027. Do not substitute Vert.x 5 defaults or Java 21 virtual-thread APIs into this baseline.
Router order and route matching
- Put authentication, authorization, and browser protections on matching routes before protected business handlers. Routes normally run in registration order; set
Route.order(int)orlast()before attaching handlers because changing an active route's order throws. On denial, callctx.fail(...)or end the response and return; never callnext()afterward. - Mount sub-routers with
router.route("/prefix/*").subRouter(sub)and verify protection on every mount, alternate path, and direct listener. Earlier matching parent handlers apply, but a second mount can expose the same sub-router through a different chain. - Declare allowed HTTP methods explicitly and keep unmatched requests out of permissive catch-all handlers. Make
OPTIONShandlers side-effect free: authentication handlers can pass through a preflight advertisingAuthorizationwithout authenticating it. Handle expected failures throughfailureHandlerorrouter.errorHandlerwithout exposing exception details. - Restrict
RoutingContext.reroute()destinations and methods to server-defined transitions and authorize the destination. Rerouting