I have been doing Java Web development for more than two years ...... I forgot how to build the environment ......, Then the eclipse official website is inexplicably suspended. Fortunately, there is still a development environment backup on the computer two years ago ......
I want to repeat Java Web development. I am ashamed to say that little brother is still doing Java Web debut ...... No.
The development environment uses eclipse for javaee (v3.4.2) + Tomcat 6.0.20
Step 1: link eclipse and tomcat
We know that Java Web runs on Web Service. Therefore, to run a Java Web Application in eclipse, we must link web service to IDE.
In eclipse, choose Window> preferences> Web Service> server and runtime, and select tomcat6.0 of Apache.
Because my environment is like this, I don't know if I only need to configure it at first. Then all the information I have is myeclipse ...... Then I had to figure it out for a long time.
Create a server in the servers view without selecting from WINDOW> show view in the servers view. The creation process is simple and will not be repeated again. Basically, there is a path to connect to your Tomcat folder.
Eclipse has been connected to Tomcat.
Step 2: I have been working on Android development since I created a Java Web project. I don't even know which one is a web project. I think it's wrong to choose one. Finally, I found the dynamic Web project in the web option. Finally, I felt very friendly when I came out of the earth folder. Here, I want to create an index.html under the webcontentfile folder, and write the standard helloworld HTML in it. Right-click the project and run the project! Step 3: Import third-party jar files. For example, if I want to introduce the mybatis package, where should I put it? You need to put the JAR file under webcontent/WEB-INF/lib, and then automatically introduced, do not need to set like android in preferences.