Eclipse install Tomcat that's something

Source: Internet
Author: User

I novice, beginner Java, just learned servlet and JSP, on the acquaintance of Tomcat such a small partner, in fact, said personally also quite like the name, the result was it played miserably.

Here's what we say about Tomcat and Eclipse:

1. First, the Eclipse and tomcat download, this is very simple, I believe everyone will, Eclipse:http://www.eclipse.org/downloads,

Tomcat:http://tomcat.apache.org. Here is a version of the problem: the latest version of Eclipse has supported Tomcat9.0, please feel free to download.

2. There are a lot of questions on the web about installing Tomcat under Eclipse, and there are two ways to install the Tomcat plugin on Eclipse and build Tomcat Project.

The second is to build a dynamic Web Project that adds our Tomcat, and the second way I take it, the first one doesn't do much experimentation.

3. The following is the actual installation configuration process:

First step: Install the Tomcat,window menu to find the Show view selection servers

As you can see here, the Servers view already appears in the Console window, then click on the connection below, select your Tomcat version, Finish, and then double-click Open Overview Panel

This is the modified diagram, and the other options do not have to be managed. This modification is very important, and Tomcat can be used after the modification.

Step Two: Create a new dynamic Web Project

If this is not the case, find the Web option and you can see it.

  

Find your version of Tomcat here, Finish.

Here we need a Servlet-api.jar package, import it in, project name right-click Build path to add External Archives, find your jar package, typically under the Lib folder in the Tomcat installation directory.

The third step: we can start the experiment, the project name or SRC right-click New Servlet, enter the name can be. This will automatically generate a bunch of code and comments, see this pile of comments is not personal overdraft itch first to remove it all clean, then you are unlucky. Note that this must not be deleted,

  

Or you're going to cry, the parentheses are the URL addresses that our client accesses to this servlet, and it's very important that your client access address be written like this, and this will change accordingly.

  

If you write something like this, you're going to change it.

OK, to this end, you write a HelloWorld to experiment it, there is a point, note that JSP files do not write in the Web-inf inside, the project file view there are several, personal recommended use of navigator.

This is my first time to write a blog, a lot of insufficient places also hope that we forgive, will redouble efforts, goodbye!

Eclipse install Tomcat that's something

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.