Jetty provides a Web server and a javax. servlet container to support SPDY, WebSocket, OSGi, JMX, JNDI, JAAS, and many other integration suites. These components are open-source and can be used for commercial purposes and distribution. Jetty is widely used in a variety of projects and products and can be used in development and production environments. Jetty can be easily embedded into devices, tools, frameworks, application servers, and clusters. For more information, see the Jetty webpage. Jett
Jetty provides a Web server and a javax. servlet container to support SPDY, WebSocket, OSGi, JMX, JNDI, JAAS, and many other integration suites. These components are open-source and can be used for commercial purposes and distribution.
Jetty is widely used in a variety of projects and products and can be used in development and production environments. Jetty can be easily embedded into devices, tools, frameworks, application servers, and clusters. For more information, see the Jetty webpage.
Jetty features
- Full functionality and standards-based
- Open-source and commercial license
- Flexible and scalable
- Small footprint
- Embedded
- Asynchronous support
- Enterprise elastic Scaling
- Apache and Eclipse dual license
Prerequisites for installing Jetty 9 on Ubuntu 14.10 server
Before installing the Jetty server, run the following command to install Java
- Sudo apt-get install openjdk-8-jdk
Java will install to/usr/lib/jvm/java-8-openjdk-i386, and a symbolic link named java-8-openjdk-i386 will be created under this directory, A symbolic link is also created in/usr/bin/java.
Now you need to download Jetty9 from here. After the download is complete, you need to use the following command to decompress
- $ Tar-xvf jetty-distribution-9.2.5.v20141112.tar.gz
This operation will decompress it to the jetty-distribution-9.2.5.v20141112, and you need to use the following command to move the archive file to/opt/jetty
- $ Mv jetty-distribution-9.2.5.v20141112/opt/jetty
Create a jetty user and set it to the owner of the/opt/jetty directory.
- Sudo useradd jetty-U-s/bin/false
- Sudo chown-R jetty: jetty/opt/jetty
Run the following command to copy the Jetty script to the startup directory to run it as a service.
- $ Cp/opt/jetty/bin/jetty. sh/etc/init. d/jetty
Now, you need to use the following content to create the Jetty setting file.
- Sudo vi/etc/default/jetty
Add the following lines
- JAVA_HOME =/usr/bin/java
- JETTY_HOME =/opt/jetty
- NO_START = 0
- JETTY_ARGS = jetty. port = 8085.
- JETTY_HOST = 0.0.0.0
- JETTY_USER = jetty
Save and exit the file
Run the following command to start the Jetty service:
- Sudo service jetty start
You should see the output similar to the following
- StartingJetty: OK MonNov2411: 55: 48 GMT 2014
If you see the following error
** ERROR: JETTY_HOME not set, you need to set it or install in a standard location
Make sure that the correct jetty home directory path is set in the/etc/default/Jetty file. You can use the following URL to test jetty.
Jetty should now run on port 8085, open the browser and access http: // server IP: 8085, you should be able to see the Jetty screen.
Jetty service check
Run the following command to verify and check the Configuration:
- Sudo service jetty check
Run the following command to enable automatic start of Jetty upon restart
- Sudo update-rc.d jetty defaults
Restart the server and test whether Jetty is automatically started.
To check which Port Jetty runs on or whether the port conflicts with other programs, run netstat-tln.
Use Jetty as an Embedded Server http://www.linuxidc.com/Linux/2013-07/86983.htm
Jetty source code analysis http://www.linuxidc.com/Linux/2013-10/90986.htm
Jetty install learn and present http://www.linuxidc.com/Linux/2014-05/101993.htm
Jetty installation http://www.linuxidc.com/Linux/2013-10/90991.htm in Eclipse
Install Jetty deployment using http://www.linuxidc.com/Linux/2014-10/108342.htm in Linux (RedHat 5.8)
Jetty details: Click here
Jetty's: Click here
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-01/112441.htm