Possible to run two webapps at once when developing with Maven/Eclipse?

前端 未结 5 1150
谎友^
谎友^ 2020-12-16 07:23

Here\'s the problem: we build webapps for clients. We also have an \"admin\" webapp that modifies some client data structures. Because of the nature of the data, both webapp

5条回答
  •  抹茶落季
    2020-12-16 08:02

    I don't have that much experience with Maven/Jetty; but I do have experience with Tomcat on Eclipse; so we're both at least doing something with servlets on Eclipse.

    At any rate, I don't know if you've made projects or not using any of the project templates in Eclipse, but I made mine using the Dynamic Web Project template. I haven't done two web apps before; but if you were to make two of these projects, and then in the Eclipse servers tab, make a new server and add both projects to it, you might be able to accomplish your goals.

    When you do Run As...you're basically just running the default run configuration that Eclipse has for your project setup. But if you deploy both of your projects to one server in your dev environment, and then select that server and hit start and it should just start it on the one JVM; similar to your production environment.

    Like I said though; I'm not using Jetty and I've never used the server setup guide with Jetty so I wouldn't know if this would work for you or not. So I hope this is helpful - but I won't be too terribly surprised if it isn't.

提交回复
热议问题