1

I am using jetty 9.2.2. In my server, I have:

  • /webapps/stuff/ - This is the folder containing all the servlets
  • /server_stuff/ - This is the folder that contains data specific to each servlet.

What I have done in the past is deployed multiple servers for ports 9000 9500 10000 etc... but managing/updating multiple servers is becoming a pain considering the "stuff" folder has the exact same servlets & code.

I've seen in this example that I can route a port to /webapps/stuffA/ and another port to /webapps/stuffB/, and most other examples point to this solution.

What I'd like:

  • /webapps/stuff/ - Port 8000 - Instance A
    • Instance A's "Jetty.home" points to /server_data/8000/
  • /webapps/stuff/ - Port 9000 - Instance B
    • Instance B's "Jetty.home" points to /server_data/9000/

So is this possible to make ports 8000 & 9000 serve the same servlets but treating them as separate instances? Ultimately, what I'm looking for is to use the same servlet code in different instances on different ports. If the "jetty.home" function is not the easiest to make happen, I of course can update the servlets to just grab what port they're listening to and reference files that way assuming multiple instances are pointing to the same servlet code.

Thanks!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.