Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJetty Bot2020-10-01 22:23:41 +0000
committerJetty Bot2020-10-01 22:23:41 +0000
commit86af99a03f7e78728d900f5176b50ed9e886ba41 (patch)
tree5ae41f0256fbe96557e50bc7387ff107bae6d44b /documentation/current/advanced-embedding.html
parent47f6544637f3d71a8f271df57035fdf7c2fd2053 (diff)
downloadjetty-86af99a03f7e78728d900f5176b50ed9e886ba41.tar.gz
jetty-86af99a03f7e78728d900f5176b50ed9e886ba41.tar.xz
jetty-86af99a03f7e78728d900f5176b50ed9e886ba41.zip
jetty-website: deploy
Diffstat (limited to 'documentation/current/advanced-embedding.html')
-rw-r--r--documentation/current/advanced-embedding.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/documentation/current/advanced-embedding.html b/documentation/current/advanced-embedding.html
index bb8228d597..a007147351 100644
--- a/documentation/current/advanced-embedding.html
+++ b/documentation/current/advanced-embedding.html
@@ -1,21 +1,21 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Chapter&nbsp;21.&nbsp;Embedding</title><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><meta name="keywords" content="jetty, servlet, servlet-api, cometd, http, websocket, eclipse, maven, java, server, software"><link rel="home" href="index.html" title="Jetty"><link rel="up" href="jetty-dev-guide.html" title="Part&nbsp;IV.&nbsp;Jetty Development Guide"><link rel="prev" href="jetty-dev-guide.html" title="Part&nbsp;IV.&nbsp;Jetty Development Guide"><link rel="next" href="embedding-jetty.html" title="Embedding Jetty"><link xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" rel="shortcut icon" href="images/favicon.ico"><link rel="stylesheet" href="css/highlighter/foundation.css"><script src="js/highlight.pack.js"></script><script>
+ <title>Chapter&nbsp;21.&nbsp;Embedding</title><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><meta name="keywords" content="jetty, servlet, servlet-api, cometd, http, websocket, eclipse, maven, java, server, software"><link rel="home" href="index.html" title="Jetty"><link rel="up" href="jetty-dev-guide.html" title="Part&nbsp;IV.&nbsp;Jetty Development Guide"><link rel="prev" href="jetty-dev-guide.html" title="Part&nbsp;IV.&nbsp;Jetty Development Guide"><link rel="next" href="embedding-jetty.html" title="Embedding Jetty"><link xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times" rel="shortcut icon" href="images/favicon.ico"><link rel="stylesheet" href="css/highlighter/foundation.css"><script src="js/highlight.pack.js"></script><script>
hljs.initHighlightingOnLoad();
- </script><link type="text/css" rel="stylesheet" href="css/font-awesome/font-awesome.min.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><tr><td style="width: 25%"><a href="http://www.eclipse.org/jetty"><img src="images/jetty-header-logo.png" alt="Jetty Logo"></a><br><span style="font-size: small">
- Version: 9.4.31.v20200723</span></td><td style="width: 50%"></td></tr></table><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;21.&nbsp;Embedding</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="jetty-dev-guide.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;IV.&nbsp;Jetty Development Guide<br><a accesskey="p" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="embedding-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr></table><hr></div><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="jetty-callout"><h5 class="callout"><a href="http://www.webtide.com/">Contact the core Jetty developers at
+ </script><link type="text/css" rel="stylesheet" href="css/font-awesome/font-awesome.min.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times"><tr><td style="width: 25%"><a href="https://www.eclipse.org/jetty/"><img src="images/jetty-header-logo.png" alt="Jetty Logo"></a><br><span style="font-size: small">
+ Version: 9.4.32.v20200930</span></td><td style="width: 50%"></td></tr></table><div xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;21.&nbsp;Embedding</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="jetty-dev-guide.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;IV.&nbsp;Jetty Development Guide<br><a accesskey="p" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="embedding-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr></table><hr></div><div xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times" class="jetty-callout"><h5 class="callout"><a href="http://www.webtide.com/">Contact the core Jetty developers at
<span class="website">www.webtide.com</span></a></h5><p>
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 for sponsored feature development
</p></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="advanced-embedding"></a>Chapter&nbsp;21.&nbsp;Embedding</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="advanced-embedding.html#jetty-helloworld">Jetty Embedded HelloWorld</a></span></dt><dt><span class="section"><a href="embedding-jetty.html">Embedding Jetty</a></span></dt><dt><span class="section"><a href="embedded-examples.html">Embedded Examples</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="jetty-helloworld"></a>Jetty Embedded HelloWorld</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="advanced-embedding.html#downloading-jars">Downloading the Jars</a></span></dt><dt><span class="section"><a href="advanced-embedding.html#writing-helloworld-example">Writing a HelloWorld Example</a></span></dt><dt><span class="section"><a href="advanced-embedding.html#compiling-helloworld-example">Compiling the HelloWord example</a></span></dt><dt><span class="section"><a href="advanced-embedding.html#running-handler-and-server">Running the Handler and Server</a></span></dt><dt><span class="section"><a href="advanced-embedding.html#next-steps">Next Steps</a></span></dt></dl></div><p>This section provides a tutorial that shows how you can quickly develop embedded code against the Jetty API.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="downloading-jars"></a>Downloading the Jars</h3></div></div></div><p>Jetty is decomposed into many jars and dependencies to achieve a minimal footprint by selecting the minimal set of jars.
Typically it is best to use something like <a class="link" href="maven-and-jetty.html#jetty-maven-helloworld" title="Using Maven">Maven</a> to manage jars, however this tutorial uses an aggregate Jar that contains all of the required Jetty classes in one Jar.
-You can manually download the aggregate <a class="link" href="https://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/9.4.31.v20200723/jetty-all-9.4.31.v20200723-uber.jar" target="_top"><code class="literal">jetty-all.jar</code></a> using <code class="literal">curl</code> or a browser.</p><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-asterisk" aria-hidden="true"></i> Note</h3><p>The central Maven repository has started to aggressively reject/deny access to the repository from the <code class="literal">wget</code> command line tool (due to abusive use of the tool by some groups).
-The administrators of the central maven repository have stated that the recommended command line download tool is now curl.</p></div></blockquote></div><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-plus" aria-hidden="true"></i> Important</h3><p>The <code class="literal">jetty-all</code> jar referenced in this section is for example purposes only and should not be used outside of this context.
+You can manually download the aggregate <a class="link" href="https://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/9.4.32.v20200930/jetty-all-9.4.32.v20200930-uber.jar" target="_top"><code class="literal">jetty-all.jar</code></a> using <code class="literal">curl</code> or a browser.</p><div class="blockquote"><blockquote class="blockquote"><div xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-asterisk" aria-hidden="true"></i> Note</h3><p>The central Maven repository has started to aggressively reject/deny access to the repository from the <code class="literal">wget</code> command line tool (due to abusive use of the tool by some groups).
+The administrators of the central maven repository have stated that the recommended command line download tool is now curl.</p></div></blockquote></div><div class="blockquote"><blockquote class="blockquote"><div xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times" class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-plus" aria-hidden="true"></i> Important</h3><p>The <code class="literal">jetty-all</code> jar referenced in this section is for example purposes only and should not be used outside of this context.
Please consider using <a class="link" href="maven-and-jetty.html#jetty-maven-helloworld" title="Using Maven">Maven</a> to manage your project dependencies.</p></div></blockquote></div><p>Use curl as follows:</p><div class="screenexample"><pre class="screen">&gt; mkdir Demo
&gt; cd Demo
-&gt; curl -o jetty-all-uber.jar https://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/9.4.31.v20200723/jetty-all-9.4.31.v20200723-uber.jar</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="writing-helloworld-example"></a>Writing a HelloWorld Example</h3></div></div></div><p>The Embedding Jetty section contains many examples of writing against the Jetty API.
+&gt; curl -o jetty-all-uber.jar https://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/9.4.32.v20200930/jetty-all-9.4.32.v20200930-uber.jar</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="writing-helloworld-example"></a>Writing a HelloWorld Example</h3></div></div></div><p>The Embedding Jetty section contains many examples of writing against the Jetty API.
This tutorial uses a simple HelloWorld handler with a main method to run the server.
-You can either <a class="link" href="https://github.com/eclipse/jetty.project/tree/jetty-9.4.x/examples/embedded/src/main/java/org/eclipse/jetty/embedded/HelloWorld.java" target="_top">download</a> or create in an editor the file <code class="literal">HelloWorld.java</code> with the following content:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>//
+You can either <a class="link" href="https://github.com/eclipse/jetty.project/tree/jetty-9.4.x/examples/embedded/src/main/java/org/eclipse/jetty/embedded/HelloWorld.java" target="_top">download</a> or create in an editor the file <code class="literal">HelloWorld.java</code> with the following content:</p><pre xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times"><code>//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
// ------------------------------------------------------------------------
@@ -76,9 +76,9 @@ public class HelloWorld extends AbstractHandler
server.join();
}
}</code></pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="compiling-helloworld-example"></a>Compiling the HelloWord example</h3></div></div></div><p>The following command compiles the HelloWorld class:</p><div class="screenexample"><pre class="screen">&gt; mkdir classes
-&gt; javac -d classes -cp jetty-all-uber.jar HelloWorld.java</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="running-handler-and-server"></a>Running the Handler and Server</h3></div></div></div><p>The following command runs the HelloWorld example:</p><div class="screenexample"><pre class="screen">&gt; java -cp classes:jetty-all-uber.jar org.eclipse.jetty.embedded.HelloWorld</pre></div><p>You can now point your browser at <a class="link" href="http://localhost:8080/" target="_top">http://localhost:8080</a> to see your hello world page.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="next-steps"></a>Next Steps</h3></div></div></div><p>To learn more about Jetty, take these next steps:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Follow the examples in <a class="link" href="embedding-jetty.html" title="Embedding Jetty">Embedding Jetty</a> to better understand the jetty APIs.</li><li class="listitem">Explore the complete <a class="link" href="http://www.eclipse.org/jetty/javadoc/9.4.31.v20200723/" target="_top">Jetty javadoc</a></li><li class="listitem">Consider using <a class="link" href="maven-and-jetty.html" title="Chapter&nbsp;23.&nbsp;Maven and Jetty">Jetty and Maven</a> to manage your Jars and dependencies.</li></ul></div></div></div></div><script type="text/javascript">
+&gt; javac -d classes -cp jetty-all-uber.jar HelloWorld.java</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="running-handler-and-server"></a>Running the Handler and Server</h3></div></div></div><p>The following command runs the HelloWorld example:</p><div class="screenexample"><pre class="screen">&gt; java -cp classes:jetty-all-uber.jar org.eclipse.jetty.embedded.HelloWorld</pre></div><p>You can now point your browser at <a class="link" href="http://localhost:8080/" target="_top">http://localhost:8080</a> to see your hello world page.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="next-steps"></a>Next Steps</h3></div></div></div><p>To learn more about Jetty, take these next steps:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Follow the examples in <a class="link" href="embedding-jetty.html" title="Embedding Jetty">Embedding Jetty</a> to better understand the jetty APIs.</li><li class="listitem">Explore the complete <a class="link" href="https://eclipse.org/jetty/javadoc/9.4.32.v20200930/" target="_top">Jetty javadoc</a></li><li class="listitem">Consider using <a class="link" href="maven-and-jetty.html" title="Chapter&nbsp;23.&nbsp;Maven and Jetty">Jetty and Maven</a> to manage your Jars and dependencies.</li></ul></div></div></div></div><script type="text/javascript">
SyntaxHighlighter.all()
- </script><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="jetty-dev-guide.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="jetty-dev-guide.html"><i class="fa fa-chevron-up" aria-hidden="true"></i> Top</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="embedding-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr><tr><td width="40%" align="left" valign="top">Part&nbsp;IV.&nbsp;Jetty Development Guide&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></td><td width="40%" align="right" valign="top">&nbsp;Embedding Jetty</td></tr></table></div><p xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><div class="jetty-callout">
+ </script><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="jetty-dev-guide.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="jetty-dev-guide.html"><i class="fa fa-chevron-up" aria-hidden="true"></i> Top</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="embedding-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr><tr><td width="40%" align="left" valign="top">Part&nbsp;IV.&nbsp;Jetty Development Guide&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></td><td width="40%" align="right" valign="top">&nbsp;Embedding Jetty</td></tr></table></div><p xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:date="http://exslt.org/dates-and-times"><div class="jetty-callout">
See an error or something missing?
<span class="callout"><a href="http://github.com/eclipse/jetty.project">Contribute to this documentation at
- <span class="website"><i class="fa fa-github" aria-hidden="true"></i> Github!</span></a></span><span style="float: right"><i>(Generated: 2020-07-23)</i></span></div></p></body></html> \ No newline at end of file
+ <span class="website"><i class="fa fa-github" aria-hidden="true"></i> Github!</span></a></span><span style="float: right"><i>(Generated: 2020-09-30)</i></span></div></p></body></html> \ No newline at end of file

Back to the top