I can not install tomcat and I do not get message when accessing localhost: 8080

3

I'm starting with Java. I downloaded the e-book and started to read. I'm paralyzed, I can not complete the Tomcat installation.

I downloaded it on link . In the "tomcat 8.0.20 Released" option, I chose "apache-tomcat-8.0.20-windows-x86". My system is Windows 7 Professional 32 bit. After decompressing the file, it generated a directory and subdirectories in "apache-tomcat-8.0.20-windows-x86".

Following the book's guidance I accessed the bin subdirectory and run the startup.bat file to start the server. There is no occurrence. Nothing happens.

Then I try to access link , which should access a page that would return by confirming and running. The Google Chrome browser returns a message that the page is not available.

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

Since there is no return, no information appears in the log subdirectory, I'm actually flying. If someone has gone through something like that and can help, it would be great.

    
asked by anonymous 13.03.2015 / 21:23

2 answers

1

Did you remember to set system variables as JAVA_HOME and JRE_HOME? Tomcat will not work without them. to vericar go to folder bin of tomcat hold shift right click, and select open command window here. type in cmd startup.bat and make sure it returns the error.

    
16.03.2015 / 20:55
0

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

Step 1: Download (the desired version) of tomcat on the link , preferably the " Binary Distributions" topic and extract it into the desired directory (I'll assume you extracted it in the C: \ directory and renamed the folder to tomcat >). So, tomcat is installed in C: \ tomcat .

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

  

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

     

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

     

2.3: In the new window that opens you 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 our example was C: \ tomcat ). Finish by clicking OK.

     

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

     

2.5: Look in this same window in the "Environment variables" area for the Path variable, 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 that already has it and add a semicolon (;) after the whole 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 open windows in this step 2 .

     

2.9: Open a NEW command prompt and run the "java" command (without the quotation marks) and then the "catalina" command (without the quotation marks). If you did not receive the message " ... is not recognized as an internal or external command, operable program or batch file. " means that you have added environment variables correctly.

Step 3: Add your applications to the webapps folder.

Step 4: At the command prompt type "catalina run" (without the quotation marks) 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 is in the webapps / test folder, for example test.html, go to localhost: 8080 / test / test.html

    
21.04.2016 / 21:15