Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/FAQ"

Line 173: Line 173:
 
| question = Does Jetty support [http://dev.w3.org/html5/websockets/ WebSocket]?
 
| question = Does Jetty support [http://dev.w3.org/html5/websockets/ WebSocket]?
 
| answer =  Yes.  Jetty has a WebSocket Server implementation.  See [http://blogs.webtide.com/gregw/entry/jetty_websocket_server this blog] for an introduction.
 
| answer =  Yes.  Jetty has a WebSocket Server implementation.  See [http://blogs.webtide.com/gregw/entry/jetty_websocket_server this blog] for an introduction.
}
+
}}
  
 
== Jetty and Your Email Service Provider ==
 
== Jetty and Your Email Service Provider ==

Revision as of 16:44, 15 July 2010



General

Question Mark.png Why is it called Jetty?

Jetty was originally developed by Greg Wilkins of Mort Bay Consulting in 1995!

Mort Bay is at the heart of Balmain, Sydney NSW, Australia. A former working class suburb, now yuppieville in Sydney's close inner-west. Greg was living by Mort Bay when the company was formed, hence the company name.

Jetty was originally called IssueTracker (its original application) and then MBServler (Mort Bay SERVLet servER). Neither of these were much liked, so Jetty was finally picked as:

  • it starts with a J
  • the double tt in jetty:// looks a little like http://
  • there is a jetty in the Mort Bay logo.
  • there were no better suggestions.



Question Mark.png What is Jetty?

Jetty is a open source project providing several HTTP based technologies. The project includes a
  • Asynchronous HTTP Server
  • Asynchronous HTTP Client
  • Servlet Container
  • Many utilities useful for creating and debugging web applications


Question Mark.png Is Jetty production ready?

Yes. Since 1995, Jetty powers hundreds of thousands of websites, serving millions of users and is embedded in thousands of products and projects.


Question Mark.png Who uses Jetty?

Jetty has a huge variety of users: See the Jetty Powered page for more exemplar users.


Question Mark.png Why use Jetty?

Some of the reasons to use Jetty over other available options are:
  • Jetty is Open source with a commercially usable license.
  • Jetty has a small foot print, yet is full featured and standards based.
  • Jetty is flexible and extensible, so that if your application/deployment is not a standard webapp, Jetty can easily be customized.
  • Jetty provides asynchronous HTTP handling within the safe standard servlet API model, without the need to program at the asynchronous IO level.
  • Jetty has an innovative, responsive and approachable developer community.
See also a Comparative Analysis with Tomcat.


Question Mark.png What's the difference between Jetty from Mort Bay, Codehaus and/or Eclipse?

The latest releases of core jetty-7 and later are available from Eclipse, which use the org.eclipse.jetty packaging. For versions 6 of Jetty, plus some jetty-7 components such as RPMs, Debs, Hightide, use codehaus, which uses the org.mortbay packaging. For more information on this topic see [1].



Question Mark.png How do I ask a question?

You can get some help from the Jetty community by posting a question to #jetty on irc.freenode.org or to the jetty-users@eclipse.org mailing list. When posting, please be sure to have available as a minimum the following information:
  1. Jetty version
  2. Browser version
  3. OS platform
  4. JVM version
  5. Command line
  6. Full stack trace of any exceptions

If your problem involves a complex webapp, please try and provide us with just a small webapp instead that also demonstrates the problem.

Debug logs, packet traces from tools such as ethereal or copies of the HTTP dialog as captured by tools such as Firefox "Live HTTP Headers" are always useful.


Question Mark.png How do I know which version of Jetty I am running?

Locate the start.jar in your distribution. Then use the "--version" flag: java -jar start.jar -- version


Question Mark.png Is commercial support available?

Yes. See Webtide.


Question Mark.png Is Jetty 7 a drop in replacement for Jetty 6?

No, while Jetty 7 has very much the same architecture as Jetty 6, there are packaging changes and other minor tweaks between the versions. Also, the Jetty 7 milestones are not as fully featured as Jetty 6 in terms of third party integrations being available by default with the distribution bundle. Please see the Upgrades section of our Getting Started documentation.


Developing with Jetty

Question Mark.png How do I get started?

See the guides under the Getting Started section.


Question Mark.png Are Maven 2 artifacts available?

Yes, Jetty is developed with Maven, and artifacts are available at http://repo2.maven.org/maven2/org/eclipse/jetty.


Question Mark.png What JARs do I need to run Jetty?

The core of Jetty has no external dependencies other than the servlet-api, but it does have several optional 3rd party jars.

The individual jetty jars may be used directly by constructing your own classpath, or the start.jar utility can be used to build a classpath. The aggregate jars may also used to reduce the number of jars required. During development, the maven build tool is ideal for accessing jetty jars and their dependencies.

The Jetty Dependencies reference explains the jars.


Question Mark.png How do I embed Jetty?

Embedding jetty is a simple writing a java main method that does new Server(80).start(). Jetty is just a POJO that can be instantiated, configured and then started. See the Embedding Jetty tutorial.


Question Mark.png Can I use spring to configure Jetty?

Yes. Jetty can be assembled with any IoC style framework including our own XmlConfiguration and spring. It is the same as embedding jetty, a server is instantiated, injected with configuration and started. See the Spring File Server example or the Jetty Spring HOWTO.

Trouble shooting

Question Mark.png Why do I get JVM Bugs reported?

Yes! There are several NIO bugs in the JVM (specially for linux) that will not be fixed in the 1.6.x series. Jetty has implemented a number of JVM NIO Bug work arounds that keep a jetty server working efficiently in the presence of these problems.


Question Mark.png JSP support not configured?

JSP is an option for Jetty. Firstly, the jars need to be present in the lib/jsp directory, but currently the JSP jars are not distributed with the jetty@eclipse download (soon will be), but they are available as part of the jetty@codehaus jetty-hightide download. Secondly, the JSP option needs to be specified for the start.jar command line.

If JSP is not correctly configured then each context started will produce an error message like:

INFO::NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
A request to a JSP will generate a 500 response with the message "500 JSP support not configured"

Others

Question Mark.png Can you recommend some useful web developer tools?

Yes!

These tools have nothing to do specifically with Jetty; they're just a list of tools we find useful in developing and diagnosing misbehaving webapps:

Browsers and GUI Tools

Http Protocol Analysis



Question Mark.png Does Jetty support WebSocket?

Yes. Jetty has a WebSocket Server implementation. See this blog for an introduction.

Jetty and Your Email Service Provider

Question Mark.png Why has my email crashed six times in the last two months? At the bottom of the error page, it says "powered by Jetty," so it must be your fault.

Jetty is the web infrastructure your service provider uses. The fact that you can see "powered by Jetty" indicates that Jetty is still working fine. It is the email application running on top of Jetty that has failed for some reason. You need to contact your service provider. To learn more about Jetty and the web application services it provides, see About Jetty.

Back to the top