0
votes

so I read a lot of articles, blogs and in forums about this topic and I always find the same answer to change the tomcat port in eclipse and for everybody else it instantly works... but not for me.

Here is my situation:

I have two Web applications (Frontend & Backend) that I want to deploy from my computer. The Frontend runs on one workspace, the backend on another workspace, so that is separated.
When I run the Frontend on tomcat Port 8080 it works fine no problem. So I tried to run the backend on the other workspace and it said port 8080 already in use. I knew that would happen, because like I said, I read a lot in forums etc.

So I tried to change the ports on frontend workspace. I changed port in the server overview, as well as in server.xml in my workspace to 9090. AND I changed the port to 9090 in the Apache tomcat home directory on my C drive as well.

server overview

server.xml file in my workspace

server.xml file home directory

I deleted the tomcat folder under the eclipse workspace and then I created a new Server in eclipse.
It worked for the server itself, you can see that in the picture from the console in red:

server console

I then started the web application again and after all this it still runs tomcat on port 8080, so I came back to stackoverflow and I hope that someone can help me:

application still running on 8080

1
Does that last image mean it's Tomcat embedded within Spring Boot? Does the server.xml control the port numbers in that case? - nitind
yes, it's embedded within spring boot. I have already solved this, by adding "server.port = 9090" under application.properties file in my spring application. Now it's running backend on 9090 and frontend on 8080. But thanks for your reply! - Maido 47

1 Answers

0
votes

I already solved this problem by adding "server.port = 9090" to my application.properties file in my web application.