I am having a jetty server running in default port :8081 , where build pointing DB1.I want to run a jetty server using same build with different port, it should point to DB2.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (171 points)
0 votes
If you are using Maven,
Replace the port number in pom.xml by a property variable like this:
Then run maven using the following command:
mvn jetty:run -Djetty.port=8081
To define a default port numer, add this default property to your pom file:
Hope that helps.