How to install and configure Jetty in linux

Source: Internet
Author: User
The following is an example of how to install and configure Jetty in linux. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at it. Jetty is an open source servlet container that provides runtime environments for Java-based web content, such as JSP and servlet. Jetty is written in Java and its APIs are released in the form of a set of JAR packages. Developers can instantiate the Jetty container into an object and quickly provide network and web connections for some Java applications that run independently (stand-alone. (Jetty is an open-source software that can be used as an HTTP service, a javax. servlet container .)

To configure the jetty server, follow these steps:

Create a server

Configure connector

Configure handler

Configure servlet

Start server

1. install maven

Maven is a software project management tool based on the project Object Model (POM). you can use a short description to manage project building, reporting, and documentation.

If you have entered the same Ant targets ten times to compile your code, jar or war, and generate javadocs, you will certainly ask yourself, whether there is a method with less repetition but can do the same job. Maven provides such an option to move your attention from the job layer to the project management layer. Maven projects can now learn how to build and bind code, run tests, generate documents, and host The Project webpage.

(1) Download and compress the jdk to the/usr/local directory:

[Root @ master ~] # Chmod 755 jdk-6u5-linux-x64.bin

[Root @ master ~] #./Jdk-6u5-linux-x64.bin

[Root @ master ~] # Mv jdk1.6.0 _ 05/usr/local

Apache Maven 2.2.1 (r801777; 03:16:01 + 0800)

Java version: 1.6.0 _ 05

Java home:/usr/local/jdk1.6.0 _ 05/jre

Default locale: en_US, platform encoding: UTF-8

OS name: "linux" version: "2.6.18-238. el5" arch: "amd64" Family: "unix"

2. install and start jetty

[Root @ master zy] # unzip jetty-distribution-7.3.0.v20110203.zip

[Root @ master zy] # mv jetty-distribution-7.3.0.v20110203/usr/local/jetty/

[Root @ master zy] # cd/usr/local/jetty/

[Root @ master jetty] # java-jar start. jar [or go to the bin directory and execute./jetty. sh start]

[Root @ master bin] #./jetty. sh start

Starting Jetty: STARTED Jetty Mon Jul 11 11:54:03 CST 2011

[Root @ master bin] #11:54:04. 014: INFO: Redirecting stderr/stdout to/usr/local/jetty/logs/20151107_11.stderrout.log

(The reason why remote.html is added here is to avoid

In the above linux, Jetty's installation and configuration methods are all the content that I have shared with you. I hope to give you a reference and support for PHP.

For more articles about Jetty installation and configuration in linux, please follow the PHP Chinese network!

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.