-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Issue #7132 Update demos #7133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #7132 Update demos #7133
Changes from 4 commits
91f7039
6bbc7c0
c7b2a95
19df8a9
c7656da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
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; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
<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> | ||
|
||
</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! | ||
<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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably be |
||
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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Odd spacing. In fact, why is this entire css even indented? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
{ | ||
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; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto on the manual merge to 11.0.x There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, It's very very rare that these files change. |
||
<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>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> | ||
</p> | ||
<p>The <code>demo</code> module pre-enables the <code>jaas</code> module.</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="me" with password="me". 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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be manually changed for the merge to 11.0.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Only the once though.