javaswaggerjettyjava-melody

Get all URLs hosted by a JETTY Service


I have a JETTY service hosted on a remote machine. I do not have the source code of the war. But, the war has doesn't have swagger. My question is, how can I get all the URLs(paths) that my service has hosted.

The war does contain java melody. so I'm able to monitor the service. Through java melody, I'm able to see statistics related to HTTP. In particular, I'm also able to view all the recent HTTP hits and the paths. But, I want all the paths that are there, like swagger.


Solution

  • There's really no practical way to obtain this information.

    That's because all of the technologies from Servlet up through the technologies that use Servlets use mappings, and rarely hardcoded paths.

    Eg:

    /people/*
    /chat/{org}/{room}
    *.jsp
    *.do
    /product/([0-9a-f]*)/([a-z]*)
    

    What you can get ...

    If the webapp / war uses anything more complex then standard servlets, then you'll be subject to whatever configuration those libraries bring to the table.

    Some common examples (not a comprehensive list):

    You will have lots of digging to do, and dissection of the war file to know what's technologies are being used, and from there how each of those technologies register their URL mappings.