DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Easily Update and Reload SSL for a Server and an HTTP Client

Trending

  • How to Build Real-Time BI Systems: Architecture, Code, and Best Practices
  • AWS to Azure Migration: A Cloudy Journey of Challenges and Triumphs
  • Memory Leak Due to Time-Taking finalize() Method
  • Infrastructure as Code (IaC) Beyond the Basics

Installing and Running Jetty

By 
Loiane Groner user avatar
Loiane Groner
·
Jul. 08, 11 · Interview
Likes (0)
Comment
Save
Tweet
Share
87.4K Views

Join the DZone community and get the full member experience.

Join For Free

This tutorial will walk you through how to download, install and run Jetty – a 100 % Java HTTP and Servlet Container.

If you do not know Jetty, the following is what Wikipedia says about it:

Jetty is a pure Java-based HTTP server and servlet container (Application server) developed as a free and open source project as part of the Eclipse Foundation. It is currently used in products such as ActiveMQ,[1]Alfresco, [2]Apache Geronimo,[3]Apache Maven, Google App Engine,[4]Eclipse,[5]FUSE,[6]HP OpenView, JBoss,[7]Liferay,[8]Ubuntu, Twitter’s Streaming API[9] and Zimbra.[10] Jetty is also used as a standard Java application server by many open source projects such as Eucalyptus and Hadoop.

I am doing some experiments, and I decided to use Jetty instead of TomCat.

So let’s get this server up and running!

1 – Downloading

You can download Jetty from two sources: Eclipse or Codehaus.

  1. http://jetty.codehaus.org/jetty/
  2. http://www.eclipse.org/jetty/downloads.php

The current stable version is 7, so I downloaded this one from Eclipse page.

The compressed file is platform independent. So if you use Mac, Linux or Windows, that is ok, it will run on any OS.

2 – Installing

Simply uncompress the file to a directory. You should have something like this:











Installation is complete! Let’s get it running.

3 – Running Jetty

  1. Open a terminal.
  2. Go to the Jetty installation directory.
  3. Enter the following command:
java -jar start.jar

Now open a browser and go to localhost to check if Jetty was installed sucessfully:

http://localhost:8080/

You should get a page like this:

And it is done!

 

From http://loianegroner.com/2011/07/installing-and-running-jetty/

Jetty (web server)

Opinions expressed by DZone contributors are their own.

Related

  • Easily Update and Reload SSL for a Server and an HTTP Client

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: