Web Project hits War package deploy Tomcat when running Startup.bat direct Flash deployment Failure solution

Source: Internet
Author: User
Tags tomcat server

That is, through the Web project into a war package deployed to the Tomcat server, solve the MySQL problem, there is a new problem, it is really twists, so the solution to share the process to everyone, hoping to help the small friends ~

Copy the ready-made war package to the Tomcat WebApps directory, Then found in the Tomcat Bin directory startup.bat batch files, directly double-click execution, the results run a few seconds after the direct flashback, suddenly have a bad feeling, in the browser to access the Web project, the results even localhost:8080 are inaccessible, the Web project is not published successfully, The face of a crazy ~

No log see why not the success of the post, think, you can slightly modify the next Startup.bat batch file, add pause, so that the end of the run will only press any key to turn off the window (debugging success, in removing pause).

If there is an error message, it will be displayed and can be based on its error.

At this point, the discovery shows some environment variables, is not the environment variable is not configured to cause the error, went to check the next, found not configured jre_home environment variables. After configuration, the discovery or the flashback.

Also do not know when the environmental variables caused by or what reason, no, can only find degrees Niang.

After checking the information, about Tomcat in the startup.bat principle of the relevant content, feel very helpful, to extract some fragments share, may solve this problem is not OK, can skip ~

Startup.bat parsing

Verify that the CATALINA_HOME environment variable is set, and if it is not set, locate the Catalina.bat file in the Catalina_home/bin directory to determine if the CATALINA_HOME environment variable is valid. If no catalina.bat is found then Goto end, end.

Verifies that the Catalina.bat exists and ends if it cannot exist.

Determine if the startup Startup.bat has parameters, if any, assign to the Cmd_line_args variable if there are any.
Execute the Catalina.bat via call and pass in the parameters.

In fact, Startup.bat's main function is to help you find Catalina.bat and execute it.

Benefits:

If you configure Catalina_home environment variables, you can put Startup.bat into any directory, you can start Tomcat.

OK, based on the parsing of the Startup.bat file, it is found that the problem is not related to environment variables. A little lost in a moment. Experience tells me that you can view the log scatter. There is an error log amount found in the log.

To solve the problem, please refer to: Web Project into war package deployed to Tomcat times MySQL Access denied for user ' root ' @ ' localhost ' (using Password:yes) Error solution

Other questions from Tomcat summary:

Question one: Neither the java_home nor the JRE_HOME environment variable is defined

Tomcat's Startup.bat, it calls the Catalina.bat, Catalina.bat calls Setclasspath.bat, as long as the environment variable (red two lines) is declared at the beginning of the Setclasspath.bat, because the environment variable is not automatically enlisted later than the new version is installed Java_home,jre_ HOME.

This automatically registers the Java_home,jre_home every time Startup.bat is run.

Question two:cannot find "D:\Program files\apache-tomcat-7.0.52\bin\setclasspath.bat"

Maybe the value of Catalina_home was written somewhere in the dead, like my green version of Tomcat in the bin file with a SetEnv.bat file, open a look is really in here is written dead Catalina_home path, This should be for some reason after being added to the settings file, after the deletion of this file, Tomcat can run normally.

In this case, you can look at the configuration in the Catalina.bat, for example, the content that may be configured to die is in this file.

Web Project hits War package deploy Tomcat when running Startup.bat direct Flash deployment Failure solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.