How to install and configure jetty in Linux

Source: Internet
Author: User
Jetty is an open-source servlet container that provides a running environment for Java-based Web content, such as JSPs and Servlets. Jetty is written in the Java language, and its APIs are published as a set of jar packages. Developers can instantiate a jetty container as an object that can quickly provide network and web connectivity for some Java applications that run independently (stand-alone). (Jetty is an open source software that can be used as a container for HTTP services, Javax.servlet. )

Steps to configure Jetty server:

Create server

Configure Connector

Configure Handler

Configuring the Servlet

Start the server

1. Install Maven

MAVEN is a software project management tool that is based on a Project object model (POM) that can manage the construction, reporting, and documentation of a project through a short description of the information.

If you've already entered the same ant targets 10 times to compile your code, jar, or war, generate Javadocs, you'll have to ask yourself if there's a way to do the same thing with less repetition. MAVEN provides the option to shift your focus from the job layer to the project management level. MAVEN projects have been able to know how to build and bundle code, run tests, generate documents, and host project pages.

(1) Download the JDK and put it into 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; 2009-08-07 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 the boot 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 in to the Bin directory and execute./jetty.sh start"

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

Starting jetty:started Jetty Mon Jul 11:54:03 CST 2011

[Root@master bin]# 2011-07-11 11:54:04.014:info::redirecting stderr/stdout to/usr/local/jetty/logs/2011_07_11. Stderrout.log

(The reason for adding remote.html here is to avoid and Tomcat

<%= "Hello World"%>

</body>

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

[Root@localhost jetty] #java-jar Start.jar

2011-07-11 13:34:16.175:info::D eployable added:/usr/local/jetty/webapps/test1

2011-07-1113:34:16.411:info::started.e.j.w.webappcontext{/test1,file:/usr/local/jetty/webapps/test1/},/usr/ Local/jetty/webapps/test1

In the browser, enter:

Above this Linux jetty installation and configuration method is small to share all the content of everyone, I hope to give you a reference, but also hope that we support a lot of topic.alibabacloud.com.

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.