Eclipse and Tomcat and Javaweb and MySQL related content

Source: Internet
Author: User
Tags java web tomcat server

Developed a Web application for a long time did not see, and do not know how the matter, how then did not remember it, now remember it.

1. Install Eclipse and Tomcat, both of which are uncompressed to install and then configure the appropriate environment variables.

2. Open eclipse,window-> perference, configure Server->runtime environment, select the corresponding Tomcat version, then set the Tomcat installation path, OK. That's how it's linked up.

3, Apache and Tomcat differences, Apache analysis of static pages better, tomcat for dynamic page parsing is good, mainly for Java Web applications, Tomcat is a JSP server, Apache is a Web server, tomcat is the application server

4. Eclipse Compile and publish project: http://blog.csdn.net/longyuhome/article/details/8362635

Web projects made in eclipse are not supported by default for publishing items to a Web server and are published to a directory in the workspace

In eclipse, the default is to put the Web project under Eclipse's workspace. Metadata\.plugins\org.eclipse.wst.server.core\tmp0 (or TMP1) \wtpwebapps\

  

Eclipse redirects the Tomcat Project publishing directory (WebApp in the Tomcat directory), so you will find that your project file cannot be found in the WebApp directory under the Tomcat installation directory.

The Tomcat project directory is set down to the directory, and the above mentioned directory, then Tomcat also from here to parse, when Wtpwebapps no Project REAL This option can choose, otherwise this option is not selected, you have to delete the item in front of the first line,

  

After you delete an item under Wtpwebapps, it becomes optional, that is, remove the project directory from Tomcat

  

By right-clicking the Tomcat server, select Add and remove to remove the deployed project in the popup dialog box. When you are finished removing the OK, you will see the Options Panel section above editable.

  

  

Select the Use Tomcat installation (Task control of Tomcat installation) to select Tomcat's installation directory as the publishing directory for the project.

Then, down four lines, see "Deploy Path"? The value behind it defaults to "Wtpwebapps", which is changed to "WebApps", which is Tomcat

The name of the folder in which the item is published.
After modification, turn off the page and save the configuration. This deploys the project to the WebApp in the Tomcat installation directory
Restart the Tomcat server, access to the http://localhost:8080 will be able to access the normal, your own deployment of the project is also able to access.

Eclipse and Tomcat and Javaweb and MySQL related content

Related Article

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.