When I open my file list-student.jsp. I experienced the following error:
Starting Tomcat v9.0 Server at localhost has encountered a problem. The server cannot be started because one or more of the ports are invalid. Open the server editor and correct invalid ports.
I tried to go server tab and change the port from 8080 to different number, but it doesn't work. I had the same problem before and I changed 8080 to another number liked 8181 and it worked, but today, even I tried to change port number and the problem can't be fixed.
The issue is that the Tomcat admin port was not defined. You need to have it as an actual number such as 9000
rather than as a hyphen -
.
This issue came in Tomcat 9 version starting from Eclipse.
The server cannot started because one or more of the ports are invalid
Only Modify the server ports "Tomcat Admin Port" default value from hyphen (-) to zero(0) it's working fine.
This is because the tomcat admin port or any other port was not defined.
Click ok and open the tomcat server at localhost.
In the highlighted area, if the port number is not defined then give it a port number, save the file and run again.
This is how i fixed this : Go to Eclipse => Window => Show View => Servers => DoubleClick on Tomcat Server => Change admin port to "1" and leave the HTTP port to "8080" . Make sure to kill any processes which are running on port 8080.You will find your project on localhost:8080/java project name , if you don't add java project name it will give you error 404. Hope this works !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With