Tomcat use to create your first web project

Tomcat use to create your first web project

First, understand the Web server software

Before deployment tomcat, first talk about the web server software is used to do? Simply put, web containers, you can deploy web projects, allowing users to access these items through a browser.

1, common javaweb server software

Common java related to web server software:

  • webLogic: oracle company, large JavaEE server, supports all the JavaEE specification, for a fee.
  • webSphere: IBM Corporation, a large JavaEE server, supports all the JavaEE specification, for a fee.
  • JBOSS: JBOSS company's large JavaEE server, supports all the JavaEE specification, for a fee.
  • Tomcat: Apache Fund, small and medium JavaEE server, supports only a small number of JavaEE specification servlet / jsp. Open source, free of charge.

See here understand why we have to deploy tomcat it, draw key - <free>! ! !

Second, personally deploy tomcat

1, prior to deployment

First, determine whether your JDK download and deployed, and note the JDK version

-Version can look at the cmd window java, here is my version

img

Here to note, Tomcat9 does not support JDK12.0,12.0 +, 1.7 + version

If you have not installed the JDK, you can directly Baidu, the tutorial is very easy. Recommend a blogger, wrote a very detailed, very comprehensive map - https://blog.csdn.net/qq_40881680/article/details/83585542(JDK installation )

2, start the download

First visit http://tomcat.apache.org/(Apache Tomcat official website) select the version you want to download, I choose here is the tomcat1.8 version.

Once you have downloaded in one of your dish, I put here the path to F: \ tomcat, you can look at my file directory

img

Clarity, the latter configuration facilitates the environment.

3, configure the environment variables

This step and the deployment of JDK or less the same, or Right My Computer -> Properties -> Advanced System Settings -> Environment Variables

It is divided into two portions to be added

(1) Set the system variables

New CATALINA_HOME value of F: \ tomcat

img

(2) Set user variable

In the path edit, create an F: \ tomcat \ lib; F: \ tomcat \ bin

img

(3) The most important thing

It has been determined to go, otherwise there is no preservation come to naught.

4. Verify the configuration.

In the cmd window startup.bat

img

In a little wait to see

img

The final step in the browser input http: // localhost: 8080 / the following is a success!

img

Three, IDEA create and deploy Web project tomcat

1, a simple explanation environment

I am here is IDEA2019.2 of Ultimate, you saw activation code online and cracked.

Posted a blog https://blog.csdn.net/adminc/article/details/97495411 (activation code ), to open their own use.

2. Create a web project

First new project, select the web application

img

Then there is the last (hhh), enter the name of your web to finish, will appear the following pattern in the left navigation bar

img

3, deployment tomcat

Add tomcat server local in the top right corner Edit Configurations

img

I just select the application server in F: \ tomcat tomcat can be installed

img

Fourth, my first web

Here index.jsp modify the body part, and run it

img

In Google my default browser

img

It's done -


I am very happy to break the IDEA Ultimate, found its function is really a lot easier than the community version, some are still using the community version of children's shoes in the creation of web projects also need to use maven, a lot of trouble. Finally, crack the code made in the text, you have to experience the Ultimate thrill of it.

Guess you like

Origin www.cnblogs.com/wangzheming35/p/11872092.html