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/Starting/Porting to Jetty 7"

Line 2: Line 2:
 
== Introduction ==
 
== Introduction ==
  
The intent of jetty-7 is to allow users to transition to the updated architecture and to access some servlet-3.0 features within a servlet 2.5 container, but without the need to update java 1.6 or to wait for the final specification.
+
The intent of jetty-7 is to allow users to transition to the updated architecture and to access some servlet-3.0 features within a servlet-2.5 container, but without the need to update Java 1.6 or to wait for the final specification.
  
Jetty 7 is not a drop-in replacement for Jetty 6. 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 full featured as Jetty 6 in terms of 3rd party integrations being available by default with the distribution bundle.
+
Jetty 7 is not a drop-in replacement for Jetty 6. 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 full featured as Jetty 6 in terms of third party integrations being available by default with the distribution bundle.  
  
 
If your application adheres to standards, porting to Jetty 7 should simply be a matter of updating your configuration files. However, if your application uses non-standard or Jetty-specific APIs, then additional porting work will be required. This page gives a brief overview of the changes needed to port to Jetty 7.
 
If your application adheres to standards, porting to Jetty 7 should simply be a matter of updating your configuration files. However, if your application uses non-standard or Jetty-specific APIs, then additional porting work will be required. This page gives a brief overview of the changes needed to port to Jetty 7.
  
== Jetty 7 @ Eclipse, Jetty 7 @ Codehaus ==  
+
== Jetty 7 Source Locations ==  
  
 
The core Jetty 7 modules have all moved to [http://www.eclipse.org/jetty/ Eclipse], but some Jetty integrations (e.g., jetty-maven-plugin, terracotta, wadi) and distributions (e.g., deb, rpm, hightide) still remain at codehaus. If you are looking for these, see [https://svn.codehaus.org/jetty/jetty/trunk codehaus trunk].
 
The core Jetty 7 modules have all moved to [http://www.eclipse.org/jetty/ Eclipse], but some Jetty integrations (e.g., jetty-maven-plugin, terracotta, wadi) and distributions (e.g., deb, rpm, hightide) still remain at codehaus. If you are looking for these, see [https://svn.codehaus.org/jetty/jetty/trunk codehaus trunk].
 +
 +
Meanwhile, [http://svn.cometd.com/trunk/cometd-java/ Jetty's implementation of a Cometd server] is no longer bundled with the core modules, but is available at [http://cometd.org/ cometd.org].
  
 
== Renaming of Classes and Packages ==
 
== Renaming of Classes and Packages ==
 
The Jetty 7 codebase was moved to the org.eclipse.jetty.* package space and remodularized so that dependencies for client, server and servlet container are more separable. We have written a converter tool to ease the conversion of your application source and configuration files to use the new package space: [[Jetty/Getting Started/Upgrade from Jetty 6 to Jetty 7|Upgrade from Jetty 6 to Jetty 7]].  
 
The Jetty 7 codebase was moved to the org.eclipse.jetty.* package space and remodularized so that dependencies for client, server and servlet container are more separable. We have written a converter tool to ease the conversion of your application source and configuration files to use the new package space: [[Jetty/Getting Started/Upgrade from Jetty 6 to Jetty 7|Upgrade from Jetty 6 to Jetty 7]].  
  
{| class="jetty-table"
+
{{:{{PAGENAME}}/Refactoring}}
|+ Quick guide to renamed packages and classes
+
! Jetty 6
+
! Matching in Jetty 7
+
! Similar in Jetty 7
+
|-
+
| org.mortbay.(jetty).* || org.eclipse.jetty.* ||
+
|-
+
| packages under modules/util - org.mortbay.util.*, org.mortbay.log, org.mortbay.component, org.mortbay.thread, org.mortbay.resource
+
| org.eclipse.jetty.util.*, org.eclipse.jetty.util.log, org.eclipse.jetty.util.component, etc
+
|-
+
| org.mortbay.jetty.security.UserRealm
+
org.mortbay.jetty.security.HashUserRealm
+
|
+
| org.eclipse.jetty.security.HashLoginService
+
org.eclipse.jetty.security.LoginService
+
|-
+
| org.mortbay.jetty.servlet.Context || org.eclipse.jetty.servlet.ServletContextHandler ||
+
|-
+
| org.mortbay.util.ajax.Continuation
+
org.mortbay.util.ajax.ContinuationSupport
+
| org.eclipse.jetty.continuation.Continuation
+
org.eclipse.jetty.continuation.ContinuationSupport
+
|
+
|}
+
  
{| class="jetty-table"
+
For a complete list of changes, see [[/Refactoring|{{SUBPAGENAME}}/Refactoring]]
|+ Other refactoring changes to watch out for when moving to Jetty 7
+
! Type of change
+
! Jetty 6
+
! Jetty 7
+
|-
+
| Maven plugin artifact id
+
| maven-jetty-plugin
+
| jetty-maven-plugin
+
|-
+
| Split up server JAR
+
| jetty.jar
+
|
+
* jetty-server.jar
+
*
+
|}
+
  
For a complete list of changes, see [[/Refactoring|{{SUBPAGENAME}}/Refactoring]]
 
 
== Architectural Changes ==
 
== Architectural Changes ==
  
Line 68: Line 30:
  
 
=== Continuations ===
 
=== Continuations ===
Jetty 7 introduces portable continuations, which are meant to
+
Jetty 7 introduces portable continuations, which allow...
 
+
== Cometd==
+
 
+
  
  
 
== Licenses ==
 
== Licenses ==
  
 +
Jetty 6 is licensed under the Apache 2.0 License; Jetty 7 is [http://eclipse.org/jetty/licenses.php dual licensed under the Apache License 2.0 and Eclipse Public License 1.0] and can be distributed under the terms of either license.
  
 
{{:Jetty/Getting Started/Jetty Version Comparison Table}}
 
{{:Jetty/Getting Started/Jetty Version Comparison Table}}
Line 81: Line 41:
  
 
== Additional Resources ==
 
== Additional Resources ==
* [[Jetty/Getting Started/Upgrade from Jetty 6 to Jetty 7|Upgrade from Jetty 6 to Jetty 7]]
+
* [[Jetty/Getting Started/Upgrade from Jetty 6 to Jetty 7|Upgrade from Jetty 6 to Jetty 7]] (conversion tool)

Revision as of 01:44, 18 June 2009


Introduction

The intent of jetty-7 is to allow users to transition to the updated architecture and to access some servlet-3.0 features within a servlet-2.5 container, but without the need to update Java 1.6 or to wait for the final specification.

Jetty 7 is not a drop-in replacement for Jetty 6. 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 full featured as Jetty 6 in terms of third party integrations being available by default with the distribution bundle.

If your application adheres to standards, porting to Jetty 7 should simply be a matter of updating your configuration files. However, if your application uses non-standard or Jetty-specific APIs, then additional porting work will be required. This page gives a brief overview of the changes needed to port to Jetty 7.

Jetty 7 Source Locations

The core Jetty 7 modules have all moved to Eclipse, but some Jetty integrations (e.g., jetty-maven-plugin, terracotta, wadi) and distributions (e.g., deb, rpm, hightide) still remain at codehaus. If you are looking for these, see codehaus trunk.

Meanwhile, Jetty's implementation of a Cometd server is no longer bundled with the core modules, but is available at cometd.org.

Renaming of Classes and Packages

The Jetty 7 codebase was moved to the org.eclipse.jetty.* package space and remodularized so that dependencies for client, server and servlet container are more separable. We have written a converter tool to ease the conversion of your application source and configuration files to use the new package space: Upgrade from Jetty 6 to Jetty 7.


Quick guide to renamed packages and classes. (Covers most, but not all, cases)
Jetty 6 Matching in Jetty 7 Similar in Jetty 7
org.mortbay.(jetty).* org.eclipse.jetty.*
packages under modules/util - org.mortbay.util.*, org.mortbay.log, org.mortbay.component, org.mortbay.thread, org.mortbay.resource org.eclipse.jetty.util.*, org.eclipse.jetty.util.log, org.eclipse.jetty.util.component, etc
org.mortbay.jetty.security.UserRealm

org.mortbay.jetty.security.HashUserRealm

org.eclipse.jetty.security.LoginService

org.eclipse.jetty.security.HashLoginService

org.mortbay.jetty.servlet.Context org.eclipse.jetty.servlet.ServletContextHandler
org.mortbay.util.ajax.Continuation

org.mortbay.util.ajax.ContinuationSupport

org.eclipse.jetty.continuation.Continuation

org.eclipse.jetty.continuation.ContinuationSupport

Other refactoring changes to watch out for when moving to Jetty 7
Type of change Jetty 6 Jetty 7
Maven plugin artifact id maven-jetty-plugin jetty-maven-plugin
Split up server JAR jetty.jar jetty-server.jar, jetty-deploy.jar, jetty-io.jar, jetty-security.jar, jetty-servlet.jar, jetty-servlets.jar, jetty-webapp.jar, jetty-xml.jar
Removed unused module jetty-html.jar ~
Renamed JAR jetty-rewrite-handler.jar jetty-rewrite.jar
Renamed JAR jetty-management.jar jetty-jmx.jar
New Continuation JAR from jetty-util.jar jetty-continuation.jar
Removed class org.mortbay.jetty.plus.jaas.callback.DefaultCallbackHandler Inner class in JAASLoginService


For a complete list of changes, see Porting to Jetty 7/Refactoring

Architectural Changes

Configuration

Handlers

Startup Options

Continuations

Jetty 7 introduces portable continuations, which allow...


Licenses

Jetty 6 is licensed under the Apache 2.0 License; Jetty 7 is dual licensed under the Apache License 2.0 and Eclipse Public License 1.0 and can be distributed under the terms of either license.

Jetty Version Comparison Table

Warning2.png
Jetty 7 and Jetty 8 are now EOL (End of Life)




THIS IS NOT THE DOCUMENTATION YOU ARE LOOKING FOR!!!!!






All development and stable releases are being performed with Jetty 9 and Jetty 10.






This wiki is now officially out of date and all content has been moved to the Jetty Documentation Hub






Direct Link to updated documentation: http://www.eclipse.org/jetty/documentation/current/what-jetty-version.html


Note: cometd server is not shipped within the Jetty distribution, it can be obtained from the cometd.org website.



Additional Resources

Copyright © Eclipse Foundation, Inc. All Rights Reserved.