Connecting multiple servlets to the internal jetty server in openfire

To give a run down of my issue. I am basically attempting to build a maven plugin, that when a client invokes specific endpoints, a function is run for each endpoint. I have written the functions related to each endpoint, but I am stuck on how to link these functions to the endpoints. To give an example - An endpoint “/helloWorld” is associated to the function the send the words Hello World. Right now I am attempting to use servlets to do this and then connect the servlets to the JettyServer so that when I put the url localhost:8080/helloWorld into postman it send Hello World to me. If there is a better way to do this I am open to it. Thanks