Jetty installation and deployment

Write picture description here

Jetty, like Tomcat, is a web container.

First go to the jetty official website to download jetty9, and then unzip the file

The first step: Jetty installation
Like Tomcat, jetty is also free to install. We only need to unzip the downloaded jetty.zip to the specified directory, then jetty can be used. Here we unzip it to D:\Java\jetty, and then you will see the following directories, briefly explain:
Write the picture description here

Step 2: Start jetty
Jetty’s startup is different from Tomcat. We know that there is a startup.bat file in Tomcat’s bin directory. We directly double-click it to start Tomcat. But there is no such startup file in the bin directory of jetty. So how do we start it?
First, run——”cmd to enter the DOS interface.

There are two ways:
1. Enter the command to enter the jetty directory, here we enter cd D:\Java\jetty
Finally, enter the startup command: java -jarstart.jar
2. Write a JettyStart9.txt directly in the current directory of jetty
Content: java -jarstart.jar
Then modify the name to the JettyStart9.bat file, start it
Wait for the following interface to appear, explaining jetty Has been successfully started.
Write the picture description here
The default port is 8080, because I have defined the tomcat port as 8080, in order not to repeat, so define 8081,
modify the port in start.ini, jetty.http.port= 8081

There is a problem here. It should be that there was a demo before jetty9. However, you need to shift+right click in the demo-base to start the command, and then enter the real-time path on the web page, http://localhost :8081
If it appears
Write the picture description here

Successful startup

Finally: the deployment project in Jetty
The deployment project in jetty is the same as the deployment project in Tomcat , Are to directly throw our project into the webapps directory of the container, and the container will automatically deploy it for us. For example, if I drop the demo directly into the webapps directory, it will be deployed automatically.

This is equivalent to tomcat -> the webapps directory is ok

Step 4: Visit the deployed project.
Directly enter the website of our project in the browser: http://localhost:8888/demo to access.

write here Picture description

Jetty, like Tomcat, is a web container.

First go to the jetty official website to download jetty9, and then unzip the file

The first step: Jetty installation
Like Tomcat, jetty is also free to install. We only need to unzip the downloaded jetty.zip to the specified directory, then jetty can be used. Here we unzip it to D:\Java\jetty, and then you will see the following directories, briefly explain:
Write the picture description here

Step 2: Start jetty
Jetty’s startup is different from Tomcat. We know that there is a startup.bat file in Tomcat’s bin directory. We directly double-click it to start Tomcat. But there is no such startup file in the bin directory of jetty. So how do we start it?
First, run——”cmd to enter the DOS interface.

There are two ways:
1. Enter the command to enter the jetty directory, here we enter cd D:\Java\jetty
Finally, enter the startup command: java -jarstart.jar
2. Write a JettyStart9.txt directly in the current directory of jetty
Content: java -jarstart.jar
Then modify the name to the JettyStart9.bat file, start it
Wait for the following interface to appear, explaining jetty Has been successfully started.
Write the picture description here
The default port is 8080, because I have defined the tomcat port as 8080, in order not to repeat, so define 8081,
modify the port in start.ini, jetty.http.port= 8081

There is a problem here. It should be that there was a demo before jetty9. However, you need to shift+right click in the demo-base to start the command, and then enter the real-time path on the web page, http://localhost :8081
If it appears
Write the picture description here

Successful startup

Finally: the deployment project in Jetty
The deployment project in jetty is the same as the deployment project in Tomcat , Are to directly throw our project into the webapps directory of the container, and the container will automatically deploy it for us. For example, if I drop the demo directly into the webapps directory, it will be deployed automatically.

This is equivalent to tomcat -> the webapps directory is ok

Step 4: Visit the deployed project.
Directly enter the website of our project in the browser: http://localhost:8888/demo to access.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4558 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.