Thursday, August 10, 2017

Port already in use in tomcat server ?

If you get 8080 port already in use , you may get 404 error.
To avoid this situation we have so many ways.


1. You can run the shutdown.bat (windows) or shutdown.sh(Linux) from
     C:\programfiles\tomcat7\bin


2. Or you can redirect the request to another port by mentioning in server.xml (C:\Progarmfiles\tomcat7\conf) file as below


    <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
    <!-- A "Connector" using the shared thread pool-->
   
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
   
 

No comments: