Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Simple Server Status Page

Hi,

On Fri, Oct 31, 2025 at 12:57 PM Emilio Recio via jetty-users
<jetty-users@xxxxxxxxxxx> wrote:
>
> Sorry if this is a simple question, but some searching leads me to more complex items like jmx and such.
>
> I am wondering if there's a simple /status page where it would return just java/app server running versions at least, and perhaps loaded webapps/contexts, system properties, and the like?
>
> curl http://localhost:8080/status
>
> Jetty v12.0.1
> Java v17.0.17
> aarch64 etc.
> Uptime ...

We don't have such a component because:

1. May leak server information to an attacker (depending on the
information, but some people already get nervous at sending the server
version)
2. Everybody wants to see different things, organized in different ways
3. Everybody wants a different format: text, json, xml, etc.

Because of this variability, we never implemented one, but all the
information is available via JMX.

It is fairly simple to write your own Handler that calls
`Server.dump()` and reports that as response content, or query what
you want and format it in the content-type you want.
You can secure it so that it can only be called e.g. from localhost,
or from known addresses, using ConditionalHandler.

There is the concept of "well-known" URI, defined in
https://datatracker.ietf.org/doc/html/rfc8615, but from a cursory
exploration I could not find any standard well-known URI in the IANA
list (https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml)
that reports some "server status".

Cheers
-- 
Simone Bordet
----
https://webtide.com
https://cometd.org
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top