Chapter 3: Tomcat Installation addressed to port 22, Telnet to 23, and so on. Browsers automatically point at port 80 if no port is specified (443 for HTTPS); hence, the use of ports is not immediately visible to the average user. Because the majority of server hardware already includes a standard Web server installation (usually Apache for Linux, and IIS for Windows), Tomcat does not attempt to connect to the standard HTTP traffic port (which is 80 by default), but rather to port 8080. The configuration file that specifies the port number is called server.xmland can be found in the installation folder of Tomcat in the %CATLINA_HOME%conf directory. It s just a text file, and somewhere within it you should find an entry similar to the following: You can find this entry by searching for the string port= 8080 . Changing this to another number will change the Tomcat port number. Changing it to 80 enables you to connect to Tomcat using the following URL without the trailing colon and port number: http://localhost/ If you have any problems, refer to the Troubleshooting and Tips section at the end of this chapter. Conversely, if all has gone well, you are now the proud owner of your own Tomcat instance. Before you are finished, you should check Tomcat s capability to serve JSP pages and servlets. To do this, choose the JSP Examples link from the left-hand menu and select some of the examples to run. Confirm that they all run as they are supposed to without error messages. Do the same for the Servlet Examples link to test this functionality. Installing Tomcat on Windows Using the ZIP File Installing Tomcat using the ZIP file is not much different from the process described earlier. The ZIP file is provided for those who prefer to manually install Tomcat. To install Tomcat using the ZIP file, simply unpack the contents of the file to your directory of choice, such as c:javatomcat-6.0. Now add the %CATALINA_HOME% environment variable as shown in the preceding directions. To check your installation, you need to follow slightly different instructions than before. Because the shortcuts for the server are not created automatically, you need to call a couple of batch files provided in the %CATALINA_HOME%bin directory for this purpose. To start the server, type the following at the command prompt: > cd %CATALINA_HOME%bin > startup.bat
For reliable and cheap web hosting services please check tomcat web hosting website.
This entry was posted
on Tuesday, January 20th, 2009 at 11:13 am and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.