I cannot install Tomcat and do not receive message when accessing localhost:8080

Asked

Viewed 526 times

3

I’m starting with Java. I downloaded the e-book and started reading. I’m paralyzed, I can’t complete the installation of Tomcat.

I downloaded into http://tomcat.apache.org. On the "Tomcat 8.0.20 Released" option, I opted for "apache-Tomcat-8.0.20-windows-x86". My system is Windows 7 32-bit Professional. After unzipping the file, it generated a directory and subdirectories in "apache-Tomcat-8.0.20-windows-x86".

Following the orientation of the book I stopped the subdirectory bin and run the file startup.bat to start the server. There is no occurrence. Nothing happens.

Then I try to access the address http://localhost:8080, who should access a page that would return confirming and executing. The Google Chrome browser returns message stating that the page is not available.

By the way I also downloaded and installed JDK Development 8.

As there is no return, no information appears in the subdirectory log, I’m really flying. If anyone has ever been through something like this and can help, it would be great.

  • 1

    Do you have any other service at port 8080? Try switching to another port. http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/

  • For example, Skype uses port 8080.

2 answers

1

Did you remember to set system variables like JAVA_HOME and JRE_HOME? Tomcat will not work without them. To check go to Tomcat bin folder hold shift right-click, and select Open Command Window here. type in cmd startup.bat and make sure it returns the error.

0

Prerequisites: Have JDK installed. (I will assume jdk is installed in the directory C: Program Files Java jdk1.8.0_45)

Step 1: Download (the version you want) from Tomcat on the official website http://tomcat.apache.org/, preferably the topic . zip "Binary Distributions" and extract in the desired directory (I will assume that extracted in the directory C:\ and renamed the folder to Tomcat). Therefore, Tomcat is installed on C: Omcat.

Step 2: Create the necessary environment variables so that the windows command prompt recognizes Tomcat and jdk in the following steps:

2.1: Open "Control Panel" > Search and open "System" > On the left side of the window click on "Advanced System Settings" > On the "Advanced" tab of the new window click on "Environment Variables" option".

2.2: In the window that opened, in the "System Variables" area click on "New".

2.3: In the new window that opened will have the field "Variable Name" and "Variable Value". In the first place CATALINA_HOME and in the second field put the path of the folder where you extracted Tomcat (in this example was C: Omcat). Finish by clicking OK.

2.4: Run the steps again 2.2 and 2.3. Running the step again 2.3, This time enter the JAVA_HOME value in the first field and in the second field put your jdk path (in this example is in C: Program Files Java jdk1.8.0_45). Finish by clicking OK.

2.5: Search in this same window in the area "Environment Variables" the variable Path, select it and click Edit.

2.6: In the new window you opened and in the "Variable Value" field go to the end of the text you already have there and add a semicolon (;) after all the text.

2.7: Add the following text after the semicolon you placed: %JAVA_HOME% bin;%CATALINA_HOME% bin

2.8: Finish by clicking OK on all windows opened in this step 2.

2.9: Open a NEW command prompt and run the command "java" (without the quotes) and then the command "Catalina" (without the quotes). If you did not receive the message "...is not recognized as an Internal or External command, operable program or batch file." means you added the environment variables correctly.

Step 3: Add your apps to the folder webapps.

Step 4: At the command prompt type "Catalina run" (without the quotes) to start the Tomcat server. If the configuration was done correctly the server will be accessible at localhost:8080. And to access a page that’s in the webapps/test folder, for example test.html, go to localhost:8080/test/test.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.