Java Web Engineering Publishing and addressing Tomcat flashback

Source: Internet
Author: User
Tags java web

1. Tomcat Flash Back

A, environment variable error

Startup.bat finally if the pause into the debug state, double-click Startup.bat, you can see the error, according to the error prompts to set the corresponding environment variables, java_home and so on.

B, Eclispe setup issues, when the ECLISPE server locations option for the first item, Tomcat can not run independently, because I am not a scholar, only to locate the problem, but also hope that the big God to help answer the cause of the problem.

2. Eclipse Releases web Engineering

A. Set the server locations to a configurable state

Right-click Server, select Add and Remove ..., and then select Remove All, OK.

Right-click Server, select Clean.

B. Configure the server locations

Options

The A-step allows the option to be optional, where:

The first is to configure the metadata locally using eclipse and does not modify the Tomcat configuration.

The second item installs the directory with Tomcat and modifies the Server.xml file

The third item is to use a specific directory

Other options: Server path is the tomcat root and deploy is the publish directory.

If you select the first item, the published path is D:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps, Eclipse can be debugged locally, but Tomcat will cause a flashback to run independently, and using localhost:8080 will result in a 404 error.

If you choose the second option, a Wtpwebapps folder will be created under the Tomcat directory, and the artifacts generated by the Web project will be copied to the directory, and will be in the server.xml of the Tomcat conf directory

Docbase is a Web project file that can be a folder product for the corresponding project name under Mavern Target, or a war file, and path is the address of the URL.

At this point, Eclipse can debug normally, and Tomcat can start normally

The third option is temporarily unused and should be the path to a custom publication.

3. Tomcat Release Project

A, publish to the WebApps directory

Put the project name product folder or exported as a war package into the directory, the war in Tomcat will be one more step, is to extract the same folder as the product folder.

B. Publish to a different path (such as Mydir under Tomcat)

Copy the corresponding project folder or war to Mydir under Tomcat

Modify the server under Conf, add the context node under the host node, and register the Web service.

Path= "" is the URL path to run after deployment, Docbase is the file name for your war. During the first run, Tomcat automatically extracts the war and generates a site with the name specified by path.

Both the war file and the Web Artifact folder will eventually be copied by Tomcat to WebApps, except that the war is copied after decompression.

4, release to Tomcat is the war good or product folder good?

Personally, the advantage of fighting a war package is that there is no shortage of directories and it is good to manage only one release file.

Java Web Engineering Publishing and addressing Tomcat flashback

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.