Issue #7132 Update demos (#7133)

* Issue #7132 Update demos
This commit is contained in:
Jan Bartel 2021-12-08 09:18:50 +11:00 committed by GitHub
parent 5de3e4901c
commit 9bd1e436c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 1073 additions and 334 deletions

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

View File

@ -1,44 +1,62 @@
<html>
<head>
<link rel="stylesheet" href="demo.css"/>
<style type='text/css'>
iframe {border: 0px}
table, tr, td {border: 0px}
</style>
</head>
<body>
<h1>Blocking vs Asynchronous REST</h1>
<p>
This demo calls the EBay WS API both synchronously and asynchronously,
to obtain items matching each of the keywords passed on the query
string. The time the request thread is held by the servlet is displayed in red for both.
</p>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-async-rest">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<table width='100%'>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1>Blocking vs Asynchronous REST</h1>
<p>
This demo calls the EBay WS API both synchronously and asynchronously, to obtain items matching each of the keywords passed on the query string. The time the request thread is held by the servlet is displayed in red for both.
</p>
<table width='100%'>
<tr>
<td>
<iframe id="f1" width='100%' height='175px' src="testSerial?items=kayak"></iframe>
</td>
<td>
<iframe id="f3" width='100%' height='175px' src="testSerial?items=mouse,beer,gnome"></iframe>
</td>
</tr>
<tr>
<td>
<iframe id="f1" width='100%' height='175px' src="testSerial?items=kayak"></iframe>
</td>
<td>
<iframe id="f3" width='100%' height='175px' src="testSerial?items=mouse,beer,gnome"></iframe>
</td>
</tr>
<tr>
<td>
<iframe id="f2" width='100%' height='175px' src="testAsync?items=kayak"/></iframe>
</td>
<td>
<iframe id="f4" width='100%' height='175px' src="testAsync?items=mouse,beer,gnome"/></iframe>
</td>
</tr>
<tr>
<td>
<iframe id="f2" width='100%' height='175px' src="testAsync?items=kayak"/></iframe>
</td>
<td>
<iframe id="f4" width='100%' height='175px' src="testAsync?items=mouse,beer,gnome"/></iframe>
</td>
</tr>
</table>
By the use of Asynchronous Servlets and the Jetty Asynchronous client, the server is able to release the thread (green) while
waiting for the response from Ebay. This thread goes back into the thread pool and can service many other requests during the wait.
This greatly reduces the number of threads needed, which in turn greatly reduces the memory requirements of the server.
<p>
Press reload to see even better results after JIT and TCP/IP warmup!
</table>
<p>
By the use of Asynchronous Servlets and the Jetty Asynchronous client, the server is able to release the thread (green) while waiting for the response from Ebay. This thread goes back into the thread pool and can service many other requests during the wait. This greatly reduces the number of threads needed, which in turn greatly reduces the memory requirements of the server.
</p>
<p>
Press your browser's reload button to see even better results after JIT and TCP/IP warmup!
</p>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

@ -33,9 +33,9 @@
<scan>10</scan>
<systemProperties>
<!-- This is for convenience so that the src/etc/login.conf file can stay unmodified when copied to $jetty.home/etc directory -->
<jetty.base>${basedir}/src/main/config/demo-base</jetty.base>
<jetty.base>${basedir}/src/main/config/modules/demo.d</jetty.base>
<!-- Mandatory. This system property tells JAAS where to find the login module configuration file -->
<java.security.auth.login.config>${basedir}/src/main/config/demo-base/etc/login.conf</java.security.auth.login.config>
<java.security.auth.login.config>${basedir}/src/main/config/modules/demo.d/demo-login.conf</java.security.auth.login.config>
</systemProperties>
<webApp>
<contextPath>/test-jaas</contextPath>

View File

@ -2,17 +2,16 @@
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate">
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h1>SUCCESS! You are AUTHENTICATED and AUTHORIZED</h1>
In order to see this page, you must have been JAAS authentictated using the
configured Login Module. You have also been AUTHORIZED according to this webapp's role-based web security constraints.
In order to see this page, you must have been JAAS <i>authenticated</i> using the
configured Login Module. You have also been <i>authorized</i> according to this webapp's role-based web security constraints.
<p>
To logout click:
<p>
<a href="logout.jsp">Logout</A>
<a href="logout.jsp">LOGOUT</A>
<p>
</body>
</html>

View File

@ -1,11 +1,10 @@
<html>
<head>
<title>Authentication Failure</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h1>Authentication Failure</h1>
<p>Sorry, either your login or password were incorrect, please try again.</p>
<a href="auth.html">Login</a>
<a href="auth.html">LOGIN</a>
</body>
</html>

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

View File

@ -3,45 +3,50 @@
<title>JAAS Authentication and Authorization Test</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" href="demo.css"/>
</style>
</head>
<body>
<a href="https://www.eclipse.org/jetty/"><img src="images/jetty_banner.gif"></A>
<br/>
<b><a href="http://localhost:8080/">Demo Home</a></b>
<hr/>
<center><span style="color:red; font-variant:small-caps; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jaas-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<h1>JAAS Authentication and Authorization Demo</h1>
<h2>Preparation</h2>
<p>To enable JAAS in a base jetty instance do:
<pre>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1>JAAS Demo</h1>
<p>
This is a demo webapp for the <a href="http://www.eclipse.org/jetty/">Eclipse Jetty HTTP Server and Servlet Container</a>. It was added into your <code>$JETTY_BASE/webapps</code> directory.
It uses a simple login module that stores its configuration in a properties file.
</p>
<h2>Preparation</h2>
<p>To use JAAS in a base jetty instance enable the <code>jaas</code> module:
<pre>
$ cd $JETTY_BASE
$ java -jar $JETTY_HOME/start.jar --add-module=jaas
</pre>
</p>
<p>This will create a <code>$JETTY_BASE/start.d/jaas.ini</code> file to enable and parameterize JAAS.
This Jetty demo-jaas already has JAAS enabled by the demo-jaas module.</p>
</p>
<p>The <code>demo</code> module pre-enables the <code>jaas</code> module.</p>
<p>The full source of this demonstration is available <a
href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jaas-webapp">here</a>.</p>
<h2>Using the Demo</h2>
<p>
<h2>Using the Demo</h2>
<p>
Click on the link below to test JAAS <i>authentication</i> and role-based web security constraint <i>authorization</i>. Use
username=&quot;me&quot; with password=&quot;me&quot;. All other usernames, passwords should result in authentication
username=<code>me</code> with password=<code>me</code>. All other usernames and passwords should result in authentication
failure.
</p>
<big><b><a href="auth.html">LOGIN</A></b></big>
<p>
This demo uses a simple login module that stores its configuration in a properties file. There are other types of login
module provided with the jetty distro. For full information, please refer to the
<a href="https://www.eclipse.org/jetty/documentation/current/">Jetty 9 documentation</a>.
</p>
</p>
<big><b><a href="auth.html">START</A></b></big>
</div>
<hr/>
<center><a href="https://www.eclipse.org/jetty/"><img style="border:0" src="images/small_powered_by.gif"/></a></center>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

@ -1,18 +1,35 @@
<html>
<head><title>JAAS Authentication and Authorization Test</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" href="demo.css"/>
</head>
<body>
<h1> Enter your username and password to login </h1>
<i> Enter login=me and password=me in order to authenticate successfully</i>
<form method="POST" action="j_security_check">
<b>Login: </b><input type="text" name="j_username">
<p>
<b>Password: </b><input type="password" name="j_password">
<p>
<input type="submit" value="Login"/>
</form>
<p>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jaas-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1> Enter your username and password to login </h1>
<i> Enter login=me and password=me in order to authenticate successfully</i>
<form method="POST" action="j_security_check">
<b>Login: </b><input type="text" name="j_username">
<p>
<b>Password: </b><input type="password" name="j_password">
<p>
<input class="test" type="submit" value="Login"/>
</form>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -3,34 +3,45 @@
<title>Powered By Jetty - Auth Links</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" href="demo.css"/>
</head>
<body>
<a href="http://jetty.eclipse.org"><img src="jetty_banner.gif"></A>
<h1>Jetty Authentication Links</h1>
<p>
This page contains several links to test the authentication constraints:
<ul>
<li><a href="auth/file.txt">auth/file.txt</a> - Forbidden</li>
<li><a href="auth/relax.txt">auth/relax.txt</a> - Allowed</li>
<li><a href="auth2">auth2/index.html</a> - Authenticated (tests FormAuthenticator.setAlwaysSaveUri())</li>
<li><a href="dump/auth/noaccess/info">dump/auth/noaccess/*</a> - Forbidden</li>
<li><a href="dump/auth/relax/info">dump/auth/relax/*</a> - Allowed</li>
<li><a href="dump/auth/info">dump/auth/*</a> - Authenticated any user with any role</li>
<li><a href="dump/auth/admin/info">dump/auth/admin/*</a> - Authenticated admin role (<a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="dump/auth/ssl/info">dump/auth/ssl/*</a> - Confidential</li>
<li><a href="rego/info">rego/info/*</a> - Authenticated admin role from programmatic security (<a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="rego2/info">rego2/info/*</a> - Authenticated servlet-administrator role from programmatic security (login as admin/admin, <a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="login?action=login">login</a> - Programmatically login as the user jetty/jetty</li>
<li><a href="login?action=x">check login status</a> - Check the request's login status</li>
<li><a href="login?action=logout">logout</a> - Programmatically logout the logged in user</li>
<li><a href="login?action=wrong">incorrect login</a> - Programmatically login with incorrect credentials</li>
</ul>
<p/>
<p>
Usernames/Passwords are jetty/jetty admin/admin & user/password
</p>
<p>
Return to <a href=".">main menu</a>.
</p>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jetty-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<div class="content">
<h1>Jetty Authentication Links</h1>
<p>
This page contains several links to test the authentication constraints:
<ul>
<li><a href="auth/file.txt">auth/file.txt</a> - Forbidden</li>
<li><a href="auth/relax.txt">auth/relax.txt</a> - Allowed</li>
<li><a href="auth2">auth2/index.html</a> - Authenticated (tests FormAuthenticator.setAlwaysSaveUri())</li>
<li><a href="dump/auth/noaccess/info">dump/auth/noaccess/*</a> - Forbidden</li>
<li><a href="dump/auth/relax/info">dump/auth/relax/*</a> - Allowed</li>
<li><a href="dump/auth/info">dump/auth/*</a> - Authenticated any user with any role</li>
<li><a href="dump/auth/admin/info">dump/auth/admin/*</a> - Authenticated admin role (<a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="dump/auth/ssl/info">dump/auth/ssl/*</a> - Confidential</li>
<li><a href="rego/info">rego/info/*</a> - Authenticated admin role from programmatic security (<a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="rego2/info">rego2/info/*</a> - Authenticated servlet-administrator role from programmatic security (login as admin/admin, <a href="session/?Action=Invalidate">click</a> to invalidate session)</li>
<li><a href="login?action=login">login</a> - Programmatically login as the user jetty/jetty</li>
<li><a href="login?action=x">check login status</a> - Check the request's login status</li>
<li><a href="login?action=logout">logout</a> - Programmatically logout the logged in user</li>
<li><a href="login?action=wrong">incorrect login</a> - Programmatically login with incorrect credentials</li>
</ul>
<p/>
<i>Usernames/Passwords are jetty/jetty admin/admin & user/password</i>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

View File

@ -3,69 +3,70 @@
<title>Powered By Jetty</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<style type="text/css">
body {
font-family: sans-serif;
}
</style>
<link rel="stylesheet" href="demo.css"/>
</head>
<body>
<a href="https://www.eclipse.org/jetty"><img src="jetty_banner.gif"></A>
<br/>
<b><a href="http://localhost:8080/">Demo Home</a></b>
<hr/>
<center><span style="color:red; font-variant:small-caps; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jetty-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<h1>Welcome to Eclipse Jetty</h1>
<p>
This is the Demo webapp for the Eclipse Jetty HTTP Server and Servlet Container.
It was added into your <code>$JETTY_BASE/webapps</code> directory.
</p>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1>Eclipse Jetty Demo Webapp</h1>
<p>
This is a demo webapp for the <a href="http://www.eclipse.org/jetty/">Eclipse Jetty HTTP Server and Servlet Container</a>. It was added into your <code>$JETTY_BASE/webapps</code> directory.
</p>
<h2>Jetty Tests:</h2>
<table border=0>
<tr valign=top>
<td>
<ul>
<li>Servlet: <a href="hello/">Hello World</a></li>
<li>Dump Servlets:
<ul>
<li><a href="dump/info">Request</a></li>
<li><a href="session/">Session</a></li>
<li><a href="cookie/">Cookie</a></li>
</ul>
</li>
<li>Comet Chat Examples:
<ul>
<li><a href="chat/">Long Polling</a></li>
<li><a href="ws">WebSocket (Jetty API)</a></li>
<li><a href="javax.websocket">WebSocket (javax.websocket)</a></li>
</ul>
</li>
</ul>
</td>
<td>
<ul>
<li><a href="auth.html">Authentication</a></li>
<li><a href="dispatch">Dispatcher Servlet</a></li>
<li><a href="rewrite/">Request Rewrite Servlet</a></li>
<li>Static content:
<ul>
<li><a href="d.txt">tiny</a></li>
<li><a href="da.txt">small</a></li>
<li><a href="dat.txt">medium</a></li>
<li><a href="data.txt">large</a></li>
<li><a href="data.txt.gz">large gziped</a></li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
</div>
<h2>Jetty Tests:</h2>
<table border=0>
<tr valign=top><td>
<ul>
<li>Servlet: <a href="hello/">Hello World</a></li>
<li>Dump Servlets: <ul>
<li><a href="dump/info">Request</a></li>
<li><a href="session/">Session</a></li>
<li><a href="cookie/">Cookie</a></li>
</ul></li>
<li>Comet Chat Examples:
<ul>
<li><a href="chat/">Long Polling</a></li>
<li><a href="ws">WebSocket (Jetty API)</a></li>
<li><a href="javax.websocket">WebSocket (javax.websocket)</a></li>
</ul>
</li>
</ul></td><td><ul>
<li><a href="auth.html">Authentication</a></li>
<li><a href="dispatch">Dispatcher Servlet</a></li>
<li><a href="rewrite/">Request Rewrite Servlet</a></li>
<li>Static content: <ul>
<li><a href="d.txt">tiny</a></li>
<li><a href="da.txt">small</a></li>
<li><a href="dat.txt">medium</a></li>
<li><a href="data.txt">large</a></li>
<li><a href="data.txt.gz">large gziped</a></li>
</ul></li>
</ul>
</td></tr></table>
<h2>Useful links:</h2>
<ul>
<li><a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jetty-webapp">Source tree of this
webapp</a></li>
<li><a href="https://www.eclipse.org/jetty/">Jetty project home</a></li>
<li><a href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a></li>
<li><a href="https://webtide.com">Commercial Support</a></li>
</ul>
</p>
<hr/>
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

View File

@ -1,6 +1,4 @@
<html>
<h1>Authentication ERROR</h1>
Username, password or role incorrect.
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</html>
</html>

View File

@ -1,34 +1,35 @@
<html>
<head>
<title>Powered By Jetty</title>
<title>Jetty Demo</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" href="demo.css"/>
</head>
<body>
<a href="https://www.eclipse.org/jetty/"><img src="jetty_banner.gif"></A>
<h1>Welcome to Jetty 10 - REMOTE ACCESS!!</h1>
<p>
This is the Test webapp for the Jetty HTTP Server and Servlet Container.
For more information about Jetty, please visit our
<a href="https://www.eclipse.org/jetty/">website</a>
or <a href="https://www.eclipse.org/jetty/documentation/current/">documentation</a>.
Commercial support for Jetty is available via <a href="http://www.webtide.com">webtide</a>.
</p>
<p>
This test context serves several demo filters and servlets
that are not safe for deployment on the internet, since (by design) they contain
cross domain scripting vulnerabilities and reveal private information. This page
is displayed because you have accessed this context from a non local IP address.
</p>
<p>
You can disable the remote address checking by editing demo-base/webapps/test.d/override-web.xml, uncommenting the
declaration of the TestFilter, and changing the
"remote" init parameter to "true".
</p>
<p>
This webapp is deployed in $JETTY_HOME/demo-base/webapps/test.war and configured by $JETTY_HOME/demo-base/webapps/test.xml
and $JETTY_HOME/demo-base/webapps/test.d/override-web.xml
</p>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jetty-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<div class="content">
<h1>Welcome to Jetty 10 - REMOTE ACCESS!!</h1>
<p>
This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container.
</p>
<p>
This test context serves several demo filters and servlets that are not safe for deployment on the internet, since (by design) they contain cross domain scripting vulnerabilities and reveal private information. This page is displayed because you have accessed this context from a non local IP address.
</p>
<p>
You can disable the remote address checking by editing demo-base/webapps/demo-jetty.d/demo-jetty-override-web.xml, uncommenting the declaration of the TestFilter, and changing the "remote" init parameter to "true".
</p>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

@ -7,7 +7,7 @@
</head>
<body>
<h1>Rewrite not enabled</h1>
<p>The rewrite handler is currently not enabled. To enable this demo, start up Jetty with:</p>
<p>The rewrite handler is currently not enabled. To enable this demo, start Jetty with:</p>
<code>java -jar start.jar --module=rewrite</code>
</body>
</html>

View File

@ -3,41 +3,57 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" href="../demo.css"/>
<title>RewriteHandler</title>
</head>
<body>
<h1>Links to test the RewriteHandler</h1>
<p>All examples below were configured using <tt>etc/jetty-rewrite.xml</tt>.</p>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jetty-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<h2>Internal URI rewrite</h2>
<dl>
<dt><a href="../some/old/context">Rewrite "../some/old/context" to "../rewritten/newcontext"</a></dt>
<dd>This demo shows how the entire request URI can be internally rewritten to point to another context, using simple text matching</dd>
<div class="content">
<h1>Links to test the RewriteHandler</h1>
<p>All examples below were configured using <code>etc/jetty-rewrite.xml</code>.</p>
<dt><a href="../rewrite/for/beginning">Rewrite "../rewrite/for/beginning" to "../rewritten/beginning"</a></dt>
<dd>This demo shows how the beginning of the request URI can be rewritten, while keeping the ending section</dd>
<h2>Internal URI rewrite</h2>
<dl>
<dt><a href="../some/old/context">Rewrite "../some/old/context" to "../rewritten/newcontext"</a></dt>
<dd>This demo shows how the entire request URI can be internally rewritten to point to another context, using simple text matching</dd>
<dt><a href="../rewritten/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar" using regex</a></dt>
<dd>This demo shows how sections of the request URI can be rearranged. It uses regex to parse out each section, and then return them in reverse order</dd>
<dt><a href="../rewrite/for/beginning">Rewrite "../rewrite/for/beginning" to "../rewritten/beginning"</a></dt>
<dd>This demo shows how the beginning of the request URI can be rewritten, while keeping the ending section</dd>
<dt><a href="../rewrite/for/reverse/bar/foo">Rewrite the beginning, and reverse the path sections</a></dt>
<dd>This demo shows how rewrite patterns can be chained.</dd>
<dt><a href="../rewritten/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar" using regex</a></dt>
<dd>This demo shows how sections of the request URI can be rearranged. It uses regex to parse out each section, and then return them in reverse order</dd>
<dt><a href="../dump/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar", full dump view</a></dt>
<dd>This demo rewrites "bar/foo" to "foo/bar" the same as earlier, but shows a full dump of the request</dd>
<dt><a href="../rewrite/for/reverse/bar/foo">Rewrite the beginning, and reverse the path sections</a></dt>
<dd>This demo shows how rewrite patterns can be chained.</dd>
<h2>Redirect</h2>
<dt><a href="../redirect/this">Redirect "../redirect/this" to "../redirected/this"</a></dt>
<dd>This demo redirects the request in a manner visible to the user agent, instead of doing an internal rewrite.</dd>
<dt><a href="../dump/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar", full dump view</a></dt>
<dd>This demo rewrites "bar/foo" to "foo/bar" the same as earlier, but shows a full dump of the request</dd>
<h2>Cookie</h2>
<dt>All pages</dt>
<dd>This demo rule sets a "visited" cookie for each page you visit. The second time you go to any of the links above, you will see an additional line, "Previously visited: yes".</dd>
<h2>Redirect</h2>
<dt><a href="../redirect/this">Redirect "../redirect/this" to "../redirected/this"</a></dt>
<dd>This demo redirects the request in a manner visible to the user agent, instead of doing an internal rewrite.</dd>
<h2>Response Code</h2>
<dt><a href="../400Error">Return a 400 error status</a></dt>
<dd>This demo shows how to modify the response code of a page to an error, based on its URL</dd>
<h2>Cookie</h2>
<dt>All pages</dt>
<dd>This demo rule sets a "visited" cookie for each page you visit. The second time you go to any of the links above, you will see an additional line, "Previously visited: yes".</dd>
</dl>
<h2>Response Code</h2>
<dt><a href="../400Error">Return a 400 error status</a></dt>
<dd>This demo shows how to modify the response code of a page to an error, based on its URL</dd>
</dl>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="../small_powered_by.gif"/></a></center>
</div>
</body>
</html>

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

View File

@ -1,52 +1,56 @@
<html>
<head>
<title>JNDI Test WebApp</title>
<title>JNDI Demo WebApp</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="demo.css"/>
</head>
<body>
<a href="https://www.eclipse.org/jetty"><img src="images/jetty_banner.gif"></A>
<br/>
<b><a href="http://localhost:8080/">Demo Home</a></b>
<hr/>
<center><span style="color:red; font-variant:small-caps; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jndi-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<h1>JNDI Test WebApp</h1>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1>Eclipse Jetty JNDI Demo Webapp</h1>
<p>
This is a demo webapp for the <a href="http://www.eclipse.org/jetty/">Eclipse Jetty HTTP Server and Servlet Container</a>. It was added into your <code>$JETTY_BASE/webapps</code> directory.
</p>
<p>
This example shows how to configure and lookup resources such as DataSources, a JTA transaction manager and a
java.mail.Session in JNDI.
</p>
<p>
It shows how to configure and lookup resources such as <code>javax.sql.DataSource</code>, a JTA transaction manager and a <code>java.mail.Session</code> in JNDI.
</p>
<h2>Preparation</h2>
<p>To enable JNDI in a base jetty instance do:
<pre>
$ cd $JETTY_BASE
$ java -jar $JETTY_HOME/start.jar --add-module=jndi
</pre>
</p>
<p>
This will create a <code>$JETTY_BASE/start.d/jndi.ini</code> file to enable and parameterise JNDI.
The jetty demo-base already has JNDI enabled and some mock resources included by the
demo-jndi module.
</p>
<p>
The full source of this demonstration is available
<a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jndi-webapp">here</a>.
</p>
<h2>Preparation</h2>
<p>To use JNDI in a base jetty instance enable the <code>jndi</code> module:
<pre>
$ cd $JETTY_BASE
$ java -jar $JETTY_HOME/start.jar --add-module=jndi
</pre>
</p>
<p>
The jetty <code>demo</code> module pre-enables JNDI along with some mock resources used by this demo.
</p>
<h2>Execution</h2>
<p>
<h2>Execution</h2>
<p>
Click <code>Test</code> to check the runtime lookup of the JNDI resources.
</p>
<form action="test" method="post">
<button type="submit">Test</button>
</form>
</p>
<form action="test" method="post">
<button class="test" type="submit">Test</button>
</form>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
<hr/>
<center><a href="https://www.eclipse.org/jetty/"><img style="border:0" src="images/small_powered_by.gif"/></a></center>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,84 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

View File

@ -3,18 +3,43 @@
<%@ page contentType="text/html; charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="demo.css"/>
</head>
<body>
<h2>JSP Examples on <%= DateTimeFormatter.ofPattern("d MMMM yyyy").format(LocalDate.now()) %></h2>
<ul>
<li><a href="dump.jsp">JSP with Embedded Java</a><br/>
<li><a href="bean1.jsp">JSP with Beans</a><br/>
<li><a href="tag.jsp">JSP with BodyTag</a><br/>
<li><a href="tag2.jsp">JSP with SimpleTag</a><br/>
<li><a href="tagfile.jsp">JSP with Tag File</a><br/>
<li><a href="expr.jsp?A=1">JSP with Tag Expression</a><br/>
<li><a href="jstl.jsp">JSTL Expression</a><br/>
<li><a href="foo/">Mapping to &lt;jsp-file&gt;</a><br/>
</ul>
<a href="/">Main Menu</a>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-jsp-webapp">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<h1>Eclipse Jetty JSP Demo Webapp</h1>
<p>
This is a demo webapp for the <a href="http://www.eclipse.org/jetty/">Eclipse Jetty HTTP Server and Servlet Container</a>. It was added into your <code>$JETTY_BASE/webapps</code> directory.
</p>
<h2>JSP Examples on <%= DateTimeFormatter.ofPattern("d MMMM yyyy").format(LocalDate.now()) %></h2>
<ul>
<li><a href="dump.jsp">JSP with Embedded Java</a><br/>
<li><a href="bean1.jsp">JSP with Beans</a><br/>
<li><a href="tag.jsp">JSP with BodyTag</a><br/>
<li><a href="tag2.jsp">JSP with SimpleTag</a><br/>
<li><a href="tagfile.jsp">JSP with Tag File</a><br/>
<li><a href="expr.jsp?A=1">JSP with Tag Expression</a><br/>
<li><a href="jstl.jsp">JSTL Expression</a><br/>
<li><a href="foo/">Mapping to &lt;jsp-file&gt;</a><br/>
</ul>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

View File

@ -1,86 +1,86 @@
<html>
<head>
<title>Test Specification WebApp</title>
<title>Demo Specification WebApp</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="demo.css"/>
</head>
<body>
<a href="https://www.eclipse.org/jetty/"><img src="images/jetty_banner.gif"></A>
<br/>
<b><a href="http://localhost:8080/">Demo Home</a></b>
<hr/>
<center><span style="color:red; font-variant:small-caps; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-spec">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<h1>Servlet 4.0 Demo WebApp</h1>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<p>
This example tests some aspects of the servlet specification:
<ul>
<li>context defaults</li>
<li>servlet annotations</li>
<li>web-fragments</li>
<li>servlet container initializers</li>
<li>multi-part upload support</li>
</ul>
The source repository for this test is available
<a href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/demo-spec/demo-spec-webapp">here</a>.
</p>
<h1>Servlet 4.0 Demo WebApp</h1>
<p>This example tests some aspects of the servlet specification:</p>
<ul>
<li>context defaults</li>
<li>servlet annotations</li>
<li>web-fragments</li>
<li>servlet container initializers</li>
<li>multi-part upload support</li>
</ul>
<h3>Test Defaults, Annotations, Fragments and Initializers</h3>
<form action="test" method="post">
<button type="submit">Test</button>
</form>
<h3>Test Defaults, Annotations, Fragments and Initializers</h3>
<form action="test" method="post">
<button class="test" type="submit">Test</button>
</form>
<h3>Test Dynamically Added Jsp File</h3>
<p>Click the link to test accessing a programmatically added jsp file</p>
<a href="dynamicjsp/x">Dynamically added jsp </a>
<h3>Test Dynamically Added JSP File</h3>
<p>Click the link to test accessing a programmatically added jsp file:</p>
<a href="dynamicjsp/x">Dynamically added jsp </a>
<h3>Test Static Content from Fragment </h3>
<p>Click the link to test accessing static content from a fragment's META-INF/resources</p>
<a href="fragmentA/index.html">Static resource from a fragment </a>
<h3>Test Static Content from Fragment </h3>
<p>Click the link to test accessing static content from a fragment's META-INF/resources:</p>
<a href="fragmentA/index.html">Static resource from a fragment </a>
<h3>Test Servlet from Fragment </h3>
<p>Click the link to test accessing a servlet added from a fragment's web-fragment.xml</p>
<a href="fragment">Servlet added by web-fragment.xml</a>
<h3>Test Servlet from Fragment </h3>
<p>Click the link to test accessing a servlet added from a fragment's web-fragment.xml:</p>
<a href="fragment">Servlet added by web-fragment.xml</a>
<h3>Test DeclaresRoles</h3>
<p>Login as user <code>admin</code> with password <code>admin</code> when prompted after clicking the button below to test @DeclareRoles annotation</p>
<form action="role" method="post">
<button type="submit">Test Role Annotations</button>
</form>
<h3>Test DeclaresRoles</h3>
<p>Login as user <code>admin</code> with password <code>admin</code> when prompted after clicking the button below to test @DeclareRoles annotation:</p>
<form action="role" method="post">
<button class="test" type="submit">Test Role Annotations</button>
</form>
<h3>Test Servlet Security</h3>
<p>Login as user <code>admin</code> with password <code>admin</code> when prompted after clicking the button below to test @ServletSecurity annotation</p>
<form action="sec/foo" method="post">
<button type="submit">Test ServletSecurity Annotation</button>
</form>
<h3>Test Servlet Security</h3>
<p>Login as user <code>admin</code> with password <code>admin</code> when prompted after clicking the button below to test @ServletSecurity annotation:</p>
<form action="sec/foo" method="post">
<button class="test" type="submit">Test ServletSecurity Annotation</button>
</form>
<h3>Test Servlet Multipart Mime</h3>
Test of the annotation:
<pre>
@MultipartConfig(location="foo/bar", maxFileSize=10240, maxRequestSize=-1, fileSizeThreshold=2048)
</pre>
<form enctype="multipart/form-data" action="multi" method=POST>
File to upload: <input name="userfile1" type="file">
<input type="submit" value="Test Upload">
</form>
<h3>Test Servlet Multipart Mime</h3>
Test the annotation:
<pre>
@MultipartConfig(location="foo/bar", maxFileSize=10240, maxRequestSize=-1, fileSizeThreshold=2048)
</pre>
<form enctype="multipart/form-data" action="multi" method=POST>
File to upload: <input class="test" name="userfile1" type="file">
<input class="test" type="submit" value="Test Upload">
</form>
<h3>AsyncListener Resource Injection</h3>
<p>Click the following link to test that javax.servlet.AsyncListeners are injectable</p>
<form action="asy/xx" method="post">
<button type="submit">Test AsyncListener</button>
</form>
<h3>AsyncListener Resource Injection</h3>
<p>Click the following link to test that <code>javax.servlet.AsyncListeners</code> are injectable:</p>
<form action="asy/xx" method="post">
<button class="test" type="submit">Test AsyncListener</button>
</form>
<h3>Test ClassPath Isolation </h3>
<p>Click the link to test classpath isolation of system and server classes</p>
<a href="classloader">ClassPathServlet</a>
<div style="text-align: center;">
<hr/>
<a href="https://www.eclipse.org/jetty/"><img style="border:0" src="images/small_powered_by.gif"/></a>
</div>
<h3>Test ClassPath Isolation </h3>
<p>Click the link to test classpath isolation of system and server classes:</p>
<a href="classloader">ClassPathServlet</a>
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.eclipse.jetty.demos</groupId>
<artifactId>demos-parent</artifactId>
<version>10.0.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>demo-template</artifactId>
<name>Demo :: Template</name>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<includes>
<include>index.html</include>
<include>small_powered_by.gif</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,83 @@
body
{
font-family: Arial, Verdana, Helvetica, sans-serif;
}
.topnav
{
overflow: hidden;
padding: 10px;
border: 1px solid #f6815c;
border-radius: 10px;
text-align: right;
}
.menu
{
margin-left: 3em;
}
.content
{
padding: 10px;
}
.footer
{
padding: 10px;
border-radius: 10px;
border: 1px solid #f6815c;
}
.test
{
background-color: #0099cc;
color: white;
padding: 10px 15px;
border: none;
font-size: 12pt;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
}
.test:hover
{
background-color: #f6815c;
color: white;
}
A:link
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:visited
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:hover
{
color: #ff6600;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}
A:active
{
color: #0099cc;
text-decoration: none;
font-weight: normal;
font-size: 11pt;
font-family:sans-serif;
}

View File

@ -0,0 +1,35 @@
<html>
<head>
<!-- Change title to suit -->
<title>XXX</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache,no-store">
<link rel="stylesheet" href="demo.css">
</head>
<body>
<div class="topnav">
<a class="menu" href="http://localhost:8080/">Demo Home</a>
<!-- Change source to suit -->
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-10.0.x/demos/XXX">Source</a>
<a class="menu" href="https://www.eclipse.org/jetty/">Jetty Project Home</a>
<a class="menu" href="https://www.eclipse.org/jetty/documentation/current/">Documentation</a>
<a class="menu" href="https://webtide.com">Commercial Support</a>
</div>
<div class="content">
<center>
<span style="color:red; font-style:italic; font-weight:bold">Demo Web Application Only - Do NOT Deploy in Production</span>
</center>
<!-- Change heading to suit -->
<h1>Jetty XXX Demo Webapp</h1>
<!-- Add your content here -->
</div>
<div class="footer">
<center><a href="https://www.eclipse.org/jetty"><img style="border:0" src="small_powered_by.gif"/></a></center>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -100,7 +100,7 @@ public class TestJettyOSGiBootWithAnnotations
assertEquals("Response status code", HttpStatus.OK_200, response.getStatus());
String content = response.getContentAsString();
TestOSGiUtil.assertContains("Response contents", content, "Test Specification WebApp");
TestOSGiUtil.assertContains("Response contents", content, "Demo Specification WebApp");
Request req = client.POST("http://127.0.0.1:" + port + "/test");
response = req.send();

View File

@ -193,7 +193,7 @@ public class QuickStartTest
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
assertEquals(200, connection.getResponseCode());
String content = IO.toString((InputStream)connection.getContent());
assertThat(content, Matchers.containsString("JNDI Test WebApp"));
assertThat(content, Matchers.containsString("JNDI Demo WebApp"));
server.stop();
}