Is a similar 1.jetty the tomcat server, you can control it through the process to start and stop.
Official website: http://www.mortbay.org
Jetty in 2.myeclipse integrated plug-ins, you can configure and start the jetty server.
3. Through the java code to start the jetty server.

Java code

  1. package com.jetty;
  2. import org.mortbay.http.SocketListener;
  3. import org.mortbay.jetty.Server;
  4. public class JettyTest (
  5. public static void main (String [] args) throws Exception (
  6. / / Define a Server object
  7. Server server = new Server ();
  8. SocketListener socket = new SocketListener ();
  9. socket.setPort (9999);
  10. / / Set service port number
  11. server.addListener (socket);
  12. / / Set Context
  13. server.addWebApplication ( "/ test1", "D: \ \ java \ \ jetty-5.1.12 \ \ webapps \ \ template");
  14. / / Start
  15. server.start ();
  16. )
  17. )
  18. May be accessed through the address: http://localhost:9999/test1/