I'm trying to add a port to tomcat at runtime. Is there a way to do this? Or is there a way to listen on all ports? I'm using spring and I want the user to be able to add call an API endpoint to add a new port to listen on.
I know that you can add additional ports in the config file, but I don't know what ports I will need to add.
@RequestMapping("/port/{port}")
void setPort(@PathVariable("port") int port){
//add new tomcat port to listen on
}