Reputation: 2363
Our application stack is composed of 1 grails app, 2 java web spring apps and 1 java app that does its own sockets. I'm using Tomcat as the server for the two web spring apps.
I'd like to be able to launch all 4 apps at once inside of intellij so that I can debug some issues with data passing between the apps.
How do I do that?
Currently it doesn't work because I cannot get the two web spring apps to launch on different ports. The grails app I set to port 80 and the java app does it's own custom port, but the other two use 8080.
Is there a way to launch them on different ports? Is there a way to make them both debuggable while only launching one? Can I hack anything into the tomcat server.xml?
Thanks
Upvotes: 2
Views: 2505
Reputation: 13
In your run configuration, under the server tab, set one of you apps that runs on port 8080 and set it to run on another port (say, 8081). That way, when your app deploys, you will be able to access them at localhost:8080, and localhost:8081.
Upvotes: 1
Reputation: 26713
If your Spring app can be packaged into a separate war, is there any reason you can't deploy them both on the same Tomcat instance?
If you can't, just install two separate Tomcat instances, each for different Spring app. Don't forget the HTTP port (8080 by default) is not the only port you need to change in server.xml
, there's also Server port, which is set to 8005 by default and possibly others (e.g. AJP if not commented out). Have a look at your $tomcat_home/conf/server.xml
to find out more.
Q> Is there a way to make them both debuggable while only launching one?
A> No, unless you want to mock one of them
Upvotes: 0