XP applications using the XP framework are essentially powered by the runtime’s HTTP engine. The HTTP engine is responsible for handling web-based request to the runtime.
By default, the XP runtime serves HTTP requests from port 8080 (customizable). There are three specific web engine implementations available:
Web app engine :8080/webapp/
Site engine :8080/site/
Admin engine :8080/admin/
Each engine provides a purpose specific request processing and execution pipeline.
Common request pipeline
All HTTP engines share a common request pipeline as specified below:
- Vhost filters
Request routing based on virtual hosts
- Java request filters
Optional Java request filters
- Auth filter
The virtual host contextual ID provider will be invoked, unless a user already exists in the context
- Engine pipeline
If nothing else matches, the pipeline of the specific engine will be executed
- Asset service
Serves static assets for the /_/asset/* request patterns
- HTTP Service
Provide access to Http service controllers through the /_/service/* request pattern
- IDprovider Service
For direct interaction with the contextual IDprovider based on the /_/idprovider/* request patterns
- Auth handler
Triggered if the pipeline returns a "401: Unauthorized" error code, the contextual IDprovider will be invoked, optionally handling the request
- Error handler
If the pipeline returns an unhandled error (everything but "200: Ok") that was not handled by an ID provider, the contextual error handler will kick in.
- Java response filters
Optional Java response filters
- Standard error handler
Finally, if the request fails with an error that is still unhandled, XP’s standard error handler will kick in
All engines reserve the use of the underscore characther
_ (by itself) to provide engine specific endpoints. This applies to at any location within the URL path hierarchy. For instance, the following request
:8080/site/<project>/<branch>/some/content/_/ are reserved.