Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
$(jetty.class.path)                              always

# Try different settings of jetty.home until the jetty.jar is found.
jetty.home=.                                     ! exists $(jetty.home)/lib/jetty.jar
jetty.home=..                                    ! exists $(jetty.home)/lib/jetty.jar
jetty.home=/home/jetty                           ! exists $(jetty.home)/lib/jetty.jar
jetty.home=/C:/jetty                             ! exists $(jetty.home)/lib/jetty.jar
jetty.home=.                                     ! exists $(jetty.home)/lib/jetty.jar

# The main class to run after this
org.mortbay.xml.XmlConfiguration.class

# The default configuration files if none are specified on the command line
$(jetty.home)/etc/jetty.xml                      nargs == 0

# javax.servlet classes
$(jetty.home)/lib/servlet-api-2.5.jar            ! available javax.servlet.Servlet

# Set the jetty classpath
$(jetty.home)/lib/*                              always

# Set the classpath for the supporting cast
$(jetty.home)/lib/jsp-2.1/*                      java >= 1.5
$(jetty.home)/lib/jsp-2.0/*                      ! available org.apache.jasper.servlet.JspServlet
$(jetty.home)/lib/management/*
$(jetty.home)/lib/naming/*
$(jetty.home)/lib/plus/*
$(jetty.home)/lib/xbean/*

# Recursively add all jars and zips from the ext lib
$(jetty.home)/lib/ext/**                        always

# Try some standard locations for anything missing.
/usr/share/java/ant.jar                          ! available org.apache.tools.ant.Main

# Add a resources directory if it is there
$(jetty.home)/resources/

Customizing start.config

You have two choices. You can unjar the start.jar file and extract the start.config file, make your changes and then re-jar it. Or, you can create your own start.config file and then reference it on the command line like so:

No Format

java -DSTART=/my/dir/start.config -jar start.jar

If you only wish to change the class whose main() method gets invoked after start.config has been parsed, then you can just set the jetty.server property instead:

No Format

java -Djetty.server=com.acme.my.Main
Warning
titleWarning

Think carefully before changing the main class. The default setup ensures that any configuration files passed on the command line are parsed and Jetty is started correctly.

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery