Community
Participate
Working Groups
Created attachment 196361 [details] Patch to correct port handling and allow multiple jetty's inside WTP The Jetty WTP plugin doesn't handle multiple instances of jetty correctly, resulting in port conflicts and problems starting or stopping instances of the jetty server. The problem appears to be an assumption that the Jetty STOP port will always be port 8082. If more than one jetty is run, only the first can bind to that port. All the rest will generate errors about the port being in use. Stopping any jetty other than the first instance will cause the first instance to be stopped, then wait. Eventually an error pops up saying that the instance failed to stop and allows you to just terminate the JVM. The solution (patch attched) appears to be to modify how port handling is done, declaring a special "admin" port that can be manipulated via the port UI. The attached patch allows the admin port to be modified, persists the value to the server directory, and then uses that port when starting or stopping jetty JVM's, thus allowing multiple simultaneous jetty instances to be run, debugged, etc.
applied, thanks!