Jetty 12.1.x move demos (#11836)
* Refactor all ee demos to remove duplicates
This commit is contained in:
parent
810eccaeea
commit
5dc9a73970
|
@ -8,7 +8,7 @@
|
|||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-openid</artifactId>
|
||||
<name>EE11 :: OpenID</name>
|
||||
<name>Core :: OpenID</name>
|
||||
<description>Jetty OpenID Connect Infrastructure</description>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-async-rest</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-async-rest-jar</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest-jar</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>EE8 :: Demo :: Async Rest :: Jar</name>
|
||||
<name>Servlet 4 :: Demo :: Async Rest :: Jar</name>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.parent.groupId}.async.rest</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-async-rest/jetty-ee9-demo-async-rest-jar</ee9.module>
|
||||
<bundle-symbolic-name>${project.parent.groupId}.servlet4.async.rest</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-async-rest/jetty-servlet5-demo-async-rest-jar</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -28,6 +28,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee11.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
@ -19,12 +19,11 @@ import java.math.RoundingMode;
|
|||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
|
||||
import jakarta.servlet.ServletConfig;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Abstract Servlet implementation class AsyncRESTServlet.
|
||||
|
@ -36,26 +35,20 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||
* <dt>items</dt><dd>The keyword to search for</dd>
|
||||
* </dl>
|
||||
*/
|
||||
public class AbstractRestServlet extends HttpServlet
|
||||
{
|
||||
public class AbstractRestServlet extends HttpServlet {
|
||||
|
||||
protected static final String __DEFAULT_APPID = "Webtide81-adf4-4f0a-ad58-d91e41bbe85";
|
||||
protected static final String STYLE =
|
||||
"<style type='text/css'>" +
|
||||
" img.thumb:hover {height:50px}" +
|
||||
" img.thumb {vertical-align:text-top}" +
|
||||
" span.red {color: #ff0000}" +
|
||||
" span.green {color: #00ff00}" +
|
||||
" iframe {border: 0px}" +
|
||||
"</style>";
|
||||
|
||||
protected static final String STYLE = "<style type='text/css'>" + " img.thumb:hover {height:50px}" + " img.thumb {vertical-align:text-top}" + " span.red {color: #ff0000}" + " span.green {color: #00ff00}" + " iframe {border: 0px}" + "</style>";
|
||||
|
||||
protected static final String ITEMS_PARAM = "items";
|
||||
|
||||
protected static final String APPID_PARAM = "appid";
|
||||
|
||||
protected String _appid;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig servletConfig) throws ServletException
|
||||
{
|
||||
public void init(ServletConfig servletConfig) throws ServletException {
|
||||
if (servletConfig.getInitParameter(APPID_PARAM) == null)
|
||||
_appid = __DEFAULT_APPID;
|
||||
else
|
||||
|
@ -64,65 +57,47 @@ public class AbstractRestServlet extends HttpServlet
|
|||
|
||||
// TODO: consider using StringUtil.sanitizeFileSystemName instead of this?
|
||||
// might introduce jetty-util dependency though
|
||||
public static String sanitize(String str)
|
||||
{
|
||||
public static String sanitize(String str) {
|
||||
if (str == null)
|
||||
return null;
|
||||
|
||||
char[] chars = str.toCharArray();
|
||||
int len = chars.length;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
for (int i = 0; i < len; i++) {
|
||||
char c = chars[i];
|
||||
if ((c <= 0x1F) || // control characters
|
||||
(c == '<') || (c == '&'))
|
||||
{
|
||||
if (// control characters
|
||||
(c <= 0x1F) || (c == '<') || (c == '&')) {
|
||||
chars[i] = '?';
|
||||
}
|
||||
}
|
||||
return String.valueOf(chars);
|
||||
}
|
||||
|
||||
protected String restURL(String item)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ("https://open.api.ebay.com/shopping?MaxEntries=3&appid=" + _appid +
|
||||
"&version=573&siteid=0&callname=FindItems&responseencoding=JSON&QueryKeywords=" +
|
||||
URLEncoder.encode(item, "UTF-8"));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
protected String restURL(String item) {
|
||||
try {
|
||||
return ("https://open.api.ebay.com/shopping?MaxEntries=3&appid=" + _appid + "&version=573&siteid=0&callname=FindItems&responseencoding=JSON&QueryKeywords=" + URLEncoder.encode(item, "UTF-8"));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected String generateThumbs(Queue<Map<String, Object>> results)
|
||||
{
|
||||
protected String generateThumbs(Queue<Map<String, Object>> results) {
|
||||
StringBuilder thumbs = new StringBuilder();
|
||||
for (Map<String, Object> m : results)
|
||||
{
|
||||
for (Map<String, Object> m : results) {
|
||||
if (!m.containsKey("GalleryURL"))
|
||||
continue;
|
||||
|
||||
thumbs.append("<a href=\"").append(m.get("ViewItemURLForNaturalSearch")).append("\">");
|
||||
thumbs.append("<img class='thumb' border='1px' height='25px' src='")
|
||||
.append(m.get("GalleryURL")).append("'")
|
||||
.append(" title='").append(m.get("Title")).append("'")
|
||||
.append("/>");
|
||||
thumbs.append("<img class='thumb' border='1px' height='25px' src='").append(m.get("GalleryURL")).append("'").append(" title='").append(m.get("Title")).append("'").append("/>");
|
||||
thumbs.append("</a> ");
|
||||
}
|
||||
return thumbs.toString();
|
||||
}
|
||||
|
||||
protected String ms(long nano)
|
||||
{
|
||||
protected String ms(long nano) {
|
||||
BigDecimal dec = new BigDecimal(nano);
|
||||
return dec.divide(new BigDecimal(1000000L)).setScale(1, RoundingMode.UP).toString();
|
||||
}
|
||||
|
||||
protected int width(long nano)
|
||||
{
|
||||
protected int width(long nano) {
|
||||
int w = (int) ((nano + 999999L) / 5000000L);
|
||||
if (w == 0)
|
||||
w = 2;
|
||||
|
@ -130,8 +105,7 @@ public class AbstractRestServlet extends HttpServlet
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
doGet(request, response);
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee10.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
@ -20,12 +20,11 @@ import java.util.Map;
|
|||
import java.util.Queue;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import jakarta.servlet.AsyncContext;
|
||||
import jakarta.servlet.ServletConfig;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.client.Response;
|
||||
import org.eclipse.jetty.client.Result;
|
||||
|
@ -45,115 +44,87 @@ import org.eclipse.jetty.util.ajax.JSON;
|
|||
* <dt>items</dt><dd>The keyword to search for</dd>
|
||||
* </dl>
|
||||
*/
|
||||
public class AsyncRestServlet extends AbstractRestServlet
|
||||
{
|
||||
public class AsyncRestServlet extends AbstractRestServlet {
|
||||
|
||||
static final String RESULTS_ATTR = "org.eclipse.jetty.demo.client";
|
||||
|
||||
static final String DURATION_ATTR = "org.eclipse.jetty.demo.duration";
|
||||
|
||||
static final String START_ATTR = "org.eclispe.jetty.demo.start";
|
||||
|
||||
HttpClient _client;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig servletConfig) throws ServletException
|
||||
{
|
||||
public void init(ServletConfig servletConfig) throws ServletException {
|
||||
super.init(servletConfig);
|
||||
|
||||
_client = new HttpClient();
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
_client.start();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
} catch (Exception e) {
|
||||
throw new ServletException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
long start = NanoTime.now();
|
||||
|
||||
// Do we have results yet?
|
||||
@SuppressWarnings("unchecked")
|
||||
Queue<Map<String, Object>> results = (Queue<Map<String, Object>>) request.getAttribute(RESULTS_ATTR);
|
||||
|
||||
// If no results, this must be the first dispatch, so send the REST request(s)
|
||||
if (results == null)
|
||||
{
|
||||
if (results == null) {
|
||||
// define results data structures
|
||||
results = new ConcurrentLinkedQueue<>();
|
||||
request.setAttribute(RESULTS_ATTR, results);
|
||||
|
||||
// suspend the request
|
||||
// This is done before scheduling async handling to avoid race of
|
||||
// dispatch before startAsync!
|
||||
final AsyncContext async = request.startAsync();
|
||||
async.setTimeout(30000);
|
||||
|
||||
// extract keywords to search for
|
||||
String[] keywords = sanitize(request.getParameter(ITEMS_PARAM)).split(",");
|
||||
final AtomicInteger outstanding = new AtomicInteger(keywords.length);
|
||||
|
||||
// Send request each keyword
|
||||
Queue<Map<String, Object>> resultsQueue = results;
|
||||
for (final String item : keywords)
|
||||
{
|
||||
_client.newRequest(restURL(item)).method(HttpMethod.GET).send(
|
||||
new AsyncRestRequest()
|
||||
{
|
||||
for (final String item : keywords) {
|
||||
_client.newRequest(restURL(item)).method(HttpMethod.GET).send(new AsyncRestRequest() {
|
||||
|
||||
@Override
|
||||
void onAuctionFound(Map<String, Object> auction)
|
||||
{
|
||||
void onAuctionFound(Map<String, Object> auction) {
|
||||
resultsQueue.add(auction);
|
||||
}
|
||||
|
||||
@Override
|
||||
void onComplete()
|
||||
{
|
||||
void onComplete() {
|
||||
if (outstanding.decrementAndGet() <= 0)
|
||||
async.dispatch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// save timing info and return
|
||||
request.setAttribute(START_ATTR, start);
|
||||
request.setAttribute(DURATION_ATTR, NanoTime.since(start));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// We have results!
|
||||
|
||||
// Generate the response
|
||||
final String thumbs = generateThumbs(results);
|
||||
|
||||
response.setContentType("text/html");
|
||||
PrintWriter out = response.getWriter();
|
||||
out.println("<html><head>");
|
||||
out.println(STYLE);
|
||||
out.println("</head><body><small>");
|
||||
|
||||
long initial = (Long) request.getAttribute(DURATION_ATTR);
|
||||
long start0 = (Long) request.getAttribute(START_ATTR);
|
||||
|
||||
long now = NanoTime.now();
|
||||
long total = NanoTime.elapsed(start0, now);
|
||||
long generate = NanoTime.elapsed(start, now);
|
||||
long thread = initial + generate;
|
||||
|
||||
out.print("<b>Asynchronous: " + sanitize(request.getParameter(ITEMS_PARAM)) + "</b><br/>");
|
||||
out.print("Total Time: " + ms(total) + "ms<br/>");
|
||||
|
||||
out.print("Thread held (<span class='red'>red</span>): " + ms(thread) + "ms (" + ms(initial) + " initial + " + ms(generate) + " generate )<br/>");
|
||||
out.print("Async wait (<span class='green'>green</span>): " + ms(total - thread) + "ms<br/>");
|
||||
|
||||
out.println("<img border='0px' src='asyncrest/red.png' height='20px' width='" + width(initial) + "px'>" +
|
||||
"<img border='0px' src='asyncrest/green.png' height='20px' width='" + width(total - thread) + "px'>" +
|
||||
"<img border='0px' src='asyncrest/red.png' height='20px' width='" + width(generate) + "px'>");
|
||||
|
||||
out.println("<img border='0px' src='asyncrest/red.png' height='20px' width='" + width(initial) + "px'>" + "<img border='0px' src='asyncrest/green.png' height='20px' width='" + width(total - thread) + "px'>" + "<img border='0px' src='asyncrest/red.png' height='20px' width='" + width(generate) + "px'>");
|
||||
out.println("<hr />");
|
||||
out.println(thumbs);
|
||||
out.println("</small>");
|
||||
|
@ -161,32 +132,27 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
out.close();
|
||||
}
|
||||
|
||||
private abstract static class AsyncRestRequest implements Response.Listener
|
||||
{
|
||||
private abstract static class AsyncRestRequest implements Response.Listener {
|
||||
|
||||
private final Utf8StringBuilder _content = new Utf8StringBuilder();
|
||||
|
||||
AsyncRestRequest()
|
||||
{
|
||||
AsyncRestRequest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Response response, ByteBuffer content)
|
||||
{
|
||||
public void onContent(Response response, ByteBuffer content) {
|
||||
byte[] bytes = BufferUtil.toArray(content);
|
||||
_content.append(bytes, 0, bytes.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(Result result)
|
||||
{
|
||||
public void onComplete(Result result) {
|
||||
// extract auctions from the results
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> query = (Map<String, Object>) new JSON().fromJSON(_content.toCompleteString());
|
||||
Object[] auctions = (Object[]) query.get("Item");
|
||||
if (auctions != null)
|
||||
{
|
||||
for (Object o : auctions)
|
||||
{
|
||||
if (auctions != null) {
|
||||
for (Object o : auctions) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> auction = (Map<String, Object>) o;
|
||||
onAuctionFound(auction);
|
||||
|
@ -201,8 +167,7 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
doGet(request, response);
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee11.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
@ -22,65 +22,50 @@ import java.net.URL;
|
|||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.eclipse.jetty.util.NanoTime;
|
||||
import org.eclipse.jetty.util.ajax.JSON;
|
||||
|
||||
/**
|
||||
* Servlet implementation class SerialRestServlet
|
||||
*/
|
||||
public class SerialRestServlet extends AbstractRestServlet
|
||||
{
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
final long start = NanoTime.now();
|
||||
public class SerialRestServlet extends AbstractRestServlet {
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
long start = NanoTime.now();
|
||||
String[] keywords = sanitize(request.getParameter(ITEMS_PARAM)).split(",");
|
||||
Queue<Map<String, Object>> results = new LinkedList<>();
|
||||
|
||||
// make all requests serially
|
||||
for (String itemName : keywords)
|
||||
{
|
||||
for (String itemName : keywords) {
|
||||
URL url = new URL(restURL(itemName));
|
||||
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> query = (Map<String, Object>) new JSON().fromJSON(new BufferedReader(new InputStreamReader(connection.getInputStream())));
|
||||
Object[] auctions = (Object[]) query.get("Item");
|
||||
if (auctions != null)
|
||||
{
|
||||
for (Object o : auctions)
|
||||
{
|
||||
if (auctions != null) {
|
||||
for (Object o : auctions) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> auction = (Map<String, Object>) o;
|
||||
results.add(auction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Generate the response
|
||||
final String thumbs = generateThumbs(results);
|
||||
|
||||
response.setContentType("text/html");
|
||||
PrintWriter out = response.getWriter();
|
||||
out.println("<html><head>");
|
||||
out.println(STYLE);
|
||||
out.println("</head><body><small>");
|
||||
|
||||
long total = NanoTime.since(start);
|
||||
|
||||
out.print("<b>Blocking: " + sanitize(request.getParameter(ITEMS_PARAM)) + "</b><br/>");
|
||||
out.print("Total Time: " + ms(total) + "ms<br/>");
|
||||
out.print("Thread held (<span class='red'>red</span>): " + ms(total) + "ms<br/>");
|
||||
|
||||
out.println("<img border='0px' src='asyncrest/red.png' height='20px' width='" + width(total) + "px'>");
|
||||
|
||||
out.println("<hr />");
|
||||
out.println(thumbs);
|
||||
out.println("</small>");
|
||||
|
@ -89,8 +74,7 @@ public class SerialRestServlet extends AbstractRestServlet
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
doGet(request, response);
|
||||
}
|
||||
}
|
|
@ -3,16 +3,16 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-async-rest</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-async-rest-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: Async Rest :: WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: Async Rest :: WebApp</name>
|
||||
|
||||
<properties>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-async-rest/jetty-ee9-demo-async-rest-webapp</ee9.module>
|
||||
<ee9.module>jetty-servlet5-demo-async-rest/jetty-servlet5-demo-async-rest-webapp</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -22,8 +22,9 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-async-rest-jar</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest-jar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -32,6 +33,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -15,4 +15,4 @@ ee8-deploy
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-async-rest.properties|webapps/ee8-demo-async-rest.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-async-rest-webapp/${jetty.version}/war|webapps/ee8-demo-async-rest.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-async-rest-webapp/${jetty.version}/war|webapps/ee8-demo-async-rest.war
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
|
||||
|
||||
<!--
|
||||
This is the jetty specific web application configuration file. When starting
|
||||
a Web Application, the WEB-INF/jetty-web.xml file is looked for and if found, treated
|
||||
as a org.eclipse.jetty.server.server.xml.XmlConfiguration file and is applied to the
|
||||
org.eclipse.jetty.ee8.servlet.WebApplicationContext object
|
||||
-->
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The ee8-demo-async-rest webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -3,25 +3,24 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-async-rest</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>EE8 :: Demo :: Async Rest</name>
|
||||
<name>Servlet 4 :: Demo :: Async Rest</name>
|
||||
|
||||
<modules>
|
||||
<module>jetty-ee8-demo-async-rest-jar</module>
|
||||
<module>jetty-ee8-demo-async-rest-server</module>
|
||||
<module>jetty-ee8-demo-async-rest-webapp</module>
|
||||
<module>jetty-servlet4-demo-async-rest-jar</module>
|
||||
<module>jetty-servlet4-demo-async-rest-webapp</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-async-rest-jar</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet4-demo-async-rest-jar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -0,0 +1,16 @@
|
|||
<?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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-servlet4-demo-jaas-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Servlet 4 :: Demo :: JAAS WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.jaas</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-jaas-webapp</ee9.module>
|
||||
</properties>
|
||||
</project>
|
|
@ -22,4 +22,4 @@ ext
|
|||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-jaas.xml|webapps/ee8-demo-jaas.xml
|
||||
basehome:modules/demo.d/ee8-demo-jaas.properties|webapps/ee8-demo-jaas.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-jaas-webapp/${jetty.version}/war|webapps/ee8-demo-jaas.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-jaas-webapp/${jetty.version}/war|webapps/ee8-demo-jaas.war
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The ee8-demo-jaas webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -0,0 +1,92 @@
|
|||
<?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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-servlet4-demo-javax-websocket-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Servlet 4 :: Demo :: Javax WebSocket WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.javax.websocket.webapp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-jakarta-websocket-webapp</ee9.module>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-javax-websocket-api</artifactId>
|
||||
<version>${ee8.jakarta.websocket.api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<supportedProjectTypes>
|
||||
<supportedProjectType>war</supportedProjectType>
|
||||
</supportedProjectTypes>
|
||||
<instructions>
|
||||
<Import-Package>javax.servlet.jsp.*;version="3.0",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package>
|
||||
<Export-Package>!org.example*</Export-Package>
|
||||
<!-- the test webapp is configured via a jetty xml file
|
||||
in order to add the security handler. -->
|
||||
<Web-ContextPath>/servlet4-demo-javax-websocket</Web-ContextPath>
|
||||
<!-- in fact the '.' must not be there
|
||||
but Felix-BND has a bug:
|
||||
http://www.mail-archive.com/users@felix.apache.org/msg04730.html
|
||||
https://issues.apache.org/jira/browse/FELIX-1571
|
||||
-->
|
||||
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
|
||||
<Jetty-Environment>ee8</Jetty-Environment>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>ee8-web-bundle-assembly</id>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/ee8-web-bundle.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>target/webapp/jakarta.websocket</directory>
|
||||
<targetPath>javax.websocket</targetPath>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,23 @@
|
|||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>webbundle-ee8</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<!-- baseDirectory>${basedir}/${project.build.directory}/${project.build.finalName}</baseDirectory -->
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${basedir}/${project.build.directory}/${project.build.finalName}/</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>WEB-INF/lib/**</exclude>
|
||||
<exclude>WEB-INF/jetty-web.xml</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
|
||||
|
||||
<!-- ==================================================================
|
||||
Configure and deploy the test web application
|
||||
===================================================================== -->
|
||||
|
||||
<Configure id="testWebapp" class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Required minimal context configuration : -->
|
||||
<!-- + contextPath -->
|
||||
<!-- + war OR baseResource -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<Set name="contextPath">/ee8-test</Set>
|
||||
<Set name="war"><Property name="jetty.webapps" default="." />/ee8-demo-javax-websocket.war
|
||||
</Set>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Optional context configuration -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<Set name="extractWAR">true</Set>
|
||||
<Set name="copyWebDir">false</Set>
|
||||
</Set>
|
||||
|
||||
<!-- Enable WebSocket container -->
|
||||
<Call name="setAttribute">
|
||||
<Arg>org.eclipse.jetty.websocket.jakarta</Arg>
|
||||
<Arg type="Boolean">true</Arg>
|
||||
</Call>
|
||||
</Configure>
|
|
@ -0,0 +1,22 @@
|
|||
# DO NOT EDIT THIS FILE - See: https://eclipse.dev/jetty/documentation/
|
||||
|
||||
[description]
|
||||
Demo Javax WebSocket Webapp
|
||||
|
||||
[environment]
|
||||
ee8
|
||||
|
||||
[tags]
|
||||
demo
|
||||
webapp
|
||||
|
||||
[depends]
|
||||
ee8-deploy
|
||||
ext
|
||||
ee8-servlets
|
||||
ee8-websocket-javax
|
||||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-javax-websocket.xml|webapps/ee8-demo-javax-websocket.xml
|
||||
basehome:modules/demo.d/ee8-demo-javax-websocket.properties|webapps/ee8-demo-javax-websocket.properties
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-javax-websocket-webapp/${jetty.version}/war|webapps/ee8-demo-javax-websocket.war
|
|
@ -2,31 +2,34 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-jetty-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-jetty-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: Jetty WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: Jetty WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.webapp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-jetty-webapp</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.webapp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-jetty-webapp</ee9.module>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>${ee8.jakarta.annotation.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet.jsp</groupId>
|
||||
<artifactId>jakarta.servlet.jsp-api</artifactId>
|
||||
<version>${ee8.jakarta.servlet.jsp.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet.jsp.jstl</groupId>
|
||||
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
|
||||
<version>${ee8.jakarta.servlet.jsp.jstl.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -34,92 +37,14 @@
|
|||
<artifactId>jetty-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-servlets</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
|
||||
<artifactId>jetty-ee8-websocket-jetty-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
|
||||
<artifactId>jetty-ee8-websocket-jetty-server</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-javax-websocket-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-webapp</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.websocket</groupId>
|
||||
<artifactId>jetty-ee8-websocket-javax-server</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<configuration>
|
||||
<stopPort>8087</stopPort>
|
||||
<stopKey>foo</stopKey>
|
||||
<scan>1</scan>
|
||||
<systemProperties>
|
||||
<fooprop>222</fooprop>
|
||||
</systemProperties>
|
||||
<webApp>
|
||||
<contextPath>/test</contextPath>
|
||||
<tempDirectory>${project.build.directory}/work</tempDirectory>
|
||||
</webApp>
|
||||
<loginServices>
|
||||
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
|
||||
<name>Test Realm</name>
|
||||
<config>${project.build.testOutputDirectory}/test-realm.properties</config>
|
||||
</loginService>
|
||||
</loginServices>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-servlet</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
|
@ -134,7 +59,7 @@
|
|||
<Export-Package>!org.example*</Export-Package>
|
||||
<!-- the test webapp is configured via a jetty xml file
|
||||
in order to add the security handler. -->
|
||||
<Web-ContextPath>/ee8-demo-jetty</Web-ContextPath>
|
||||
<Web-ContextPath>/servlet4-demo-jetty</Web-ContextPath>
|
||||
<!-- in fact the '.' must not be there
|
||||
but Felix-BND has a bug:
|
||||
http://www.mail-archive.com/users@felix.apache.org/msg04730.html
|
||||
|
@ -157,7 +82,7 @@
|
|||
<phase>package</phase>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/web-bundle.xml</descriptor>
|
||||
<descriptor>src/main/assembly/web-bundle-ee8.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
@ -1,7 +1,7 @@
|
|||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>webbundle</id>
|
||||
<id>webbundle-ee8</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
|
@ -24,8 +24,8 @@ ee8-demo-rewrite
|
|||
demo-realm
|
||||
|
||||
[files]
|
||||
webapps/demo-jetty.d/
|
||||
webapps/ee8-demo-jetty.d/
|
||||
basehome:modules/demo.d/ee8-demo-jetty.xml|webapps/ee8-demo-jetty.xml
|
||||
basehome:modules/demo.d/ee8-demo-jetty-override-web.xml|webapps/ee8-demo-jetty.d/ee8-demo-jetty-override-web.xml
|
||||
basehome:modules/demo.d/ee8-demo-jetty.properties|webapps/ee8-demo-jetty.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-jetty-webapp/${jetty.version}/war|webapps/ee8-demo-jetty.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-jetty-webapp/${jetty.version}/war|webapps/ee8-demo-jetty.war
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
|
||||
|
||||
<!--
|
||||
This is the jetty specific web application configuration file. When starting
|
||||
a Web Application, the WEB-INF/jetty-web.xml file is looked for and if found, treated
|
||||
as a org.eclipse.jetty.server.server.xml.XmlConfiguration file and is applied to the
|
||||
org.eclipse.jetty.ee8.servlet.WebApplicationContext object
|
||||
-->
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="serverClassMatcher">
|
||||
<Call name="exclude">
|
||||
<Arg>
|
||||
<Array type="String">
|
||||
<Item>org.eclipse.jetty.util.</Item>
|
||||
<Item>org.eclipse.jetty.ee8.servlets.</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Get>
|
||||
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The ee8-demo-jetty webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -2,64 +2,44 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-jndi-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-jndi-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: JNDI WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: JNDI WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.jndi</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-jndi-webapp</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.jndi</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-jndi-webapp</ee9.module>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.transaction</groupId>
|
||||
<artifactId>jakarta.transaction-api</artifactId>
|
||||
<version>${ee8.jakarta.transaction-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-mock-resources</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-mock-resources</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.mail.glassfish</artifactId>
|
||||
<version>${ee8.javax.mail.glassfish.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<configuration>
|
||||
<contextXml>${project.build.directory}/plugin-context.xml</contextXml>
|
||||
<webApp>
|
||||
<war>src/main/webapp</war>
|
||||
<descriptor>${project.build.directory}/webapp/WEB-INF/web.xml</descriptor>
|
||||
<contextPath>/test-jndi</contextPath>
|
||||
</webApp>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-mock-resources</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
|
@ -21,8 +21,8 @@ ee8-demo-mock-resources
|
|||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-jndi.xml|webapps/ee8-demo-jndi.xml
|
||||
basehome:modules/demo.d/ee8-demo-jndi.properties|webapps/ee8-demo-jndi.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-jndi-webapp/${jetty.version}/war|webapps/ee8-demo-jndi.war
|
||||
maven://org.eclipse.jetty.orbit/javax.mail.glassfish/@javax.mail.glassfish.version@/jar|lib/ee8/javax.mail.glassfish-@javax.mail.glassfish.version@.jar
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-jndi-webapp/${jetty.version}/war|webapps/ee8-demo-jndi.war
|
||||
maven://org.eclipse.jetty.orbit/javax.mail.glassfish/@ee8.javax.mail.glassfish.version@/jar|lib/ee8/javax.mail.glassfish-@ee8.javax.mail.glassfish.version@.jar
|
||||
|
||||
[lib]
|
||||
lib/ee8/javax.mail.glassfish-@javax.mail.glassfish.version@.jar
|
||||
lib/ee8/javax.mail.glassfish-@ee8.javax.mail.glassfish.version@.jar
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure id='wac' class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
|
||||
<!-- Add an EnvEntry only valid for this webapp -->
|
||||
<New id="gargle" class="org.eclipse.jetty.plus.jndi.EnvEntry">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>gargle</Arg>
|
||||
<Arg type="java.lang.Double">100</Arg>
|
||||
<Arg type="boolean">true</Arg>
|
||||
</New>
|
||||
|
||||
<!-- Add an override for a global EnvEntry -->
|
||||
<New id="wiggle" class="org.eclipse.jetty.plus.jndi.EnvEntry">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>wiggle</Arg>
|
||||
<Arg type="java.lang.Double">55.0</Arg>
|
||||
<Arg type="boolean">true</Arg>
|
||||
</New>
|
||||
|
||||
<!-- Add a mapping from name in web.xml to the environment -->
|
||||
<New id="map1" class="org.eclipse.jetty.plus.jndi.Link">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>jdbc/mydatasource1</Arg> <!-- name in web.xml -->
|
||||
<Arg>jdbc/mydatasource</Arg> <!-- name in environment -->
|
||||
</New>
|
||||
|
||||
|
||||
<New class="org.eclipse.jetty.plus.jndi.EnvEntry">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>svr</Arg>
|
||||
<Arg type="java.lang.String">
|
||||
<Ref refid="Server">
|
||||
<Get name="class">
|
||||
<Get name="name"/>
|
||||
</Get>
|
||||
</Ref>
|
||||
</Arg>
|
||||
<Arg type="boolean">true</Arg>
|
||||
</New>
|
||||
|
||||
|
||||
</Configure>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The ee8-demo-jndi webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -3,33 +3,36 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-jsp-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-jsp-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: JSP WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: JSP WebApp</name>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.jsp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-jsp-webapp</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.jsp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-jsp-webapp</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet.jsp</groupId>
|
||||
<artifactId>jakarta.servlet.jsp-api</artifactId>
|
||||
<version>${ee8.jakarta.servlet.jsp.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet.jsp.jstl</groupId>
|
||||
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
|
||||
<version>${ee8.jakarta.servlet.jsp.jstl.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -48,7 +51,7 @@
|
|||
<!--Import-Package>javax.servlet.jsp.*;version="[2,3)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package-->
|
||||
<Import-Package>javax.servlet.jsp;version="[2.2.0,4.1)",javax.servlet.jsp.tagext;version="[2.2.0,4.1)",java.io,java.lang,java.text,java.util,javax.servlet;version="[4.0.0,5)",javax.servlet.http;version="[4.0.0,5)"</Import-Package>
|
||||
<Export-Package>!org.example.*</Export-Package>
|
||||
<Web-ContextPath>/ee8-demo-jsp</Web-ContextPath>
|
||||
<Web-ContextPath>/servlet4-demo-jsp</Web-ContextPath>
|
||||
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
|
||||
<Jetty-Environment>ee8</Jetty-Environment>
|
||||
</instructions>
|
||||
|
@ -65,7 +68,7 @@
|
|||
<phase>package</phase>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/web-bundle.xml</descriptor>
|
||||
<descriptor>src/main/assembly/web-bundle-ee8.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
|
@ -86,6 +89,7 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<!-- TODO
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>precompile-jsp</id>
|
||||
|
@ -99,8 +103,8 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jspc-maven-plugin</artifactId>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-jspc-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -108,14 +112,12 @@
|
|||
<goals>
|
||||
<goal>jspc</goal>
|
||||
</goals>
|
||||
<!-- example configuration
|
||||
<configuration>
|
||||
<includes>**/*.foo</includes>
|
||||
<excludes>**/*.fff</excludes>
|
||||
<sourceVersion>1.8</sourceVersion>
|
||||
<targetVersion>1.8</targetVersion>
|
||||
</configuration>
|
||||
-->
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
@ -123,5 +125,5 @@
|
|||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
-->
|
||||
</project>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<assembly>
|
||||
<id>webbundle</id>
|
||||
<id>webbundle-ee8</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
|
@ -15,4 +15,4 @@ ee8-deploy
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-jsp.properties|webapps/ee8-demo-jsp.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-jsp-webapp/${jetty.version}/war|webapps/ee8-demo-jsp.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-jsp-webapp/${jetty.version}/war|webapps/ee8-demo-jsp.war
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
<Call name="log"><Arg>The ee8-demo-jsp webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -2,31 +2,34 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-mock-resources</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-mock-resources</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>EE8 :: Demo :: Mock Resources</name>
|
||||
<name>Servlet 4 :: Demo :: Mock Resources</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.mocks</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-mock-resources</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.mocks</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-mock-resources</ee9.module>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.transaction</groupId>
|
||||
<artifactId>jakarta.transaction-api</artifactId>
|
||||
<version>${ee8.jakarta.transaction-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.mail.glassfish</artifactId>
|
||||
<version>${ee8.javax.mail.glassfish.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -43,7 +46,7 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>org.eclipse.jetty.ee8.demos.ee8-demo-mock-resources</Bundle-SymbolicName>
|
||||
<Bundle-SymbolicName>org.eclipse.jetty.demos.servlet4-demo-mock-resources</Bundle-SymbolicName>
|
||||
<Bundle-Description>Mock resources used for testing</Bundle-Description>
|
||||
<Export-Package>org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
|
||||
<Import-Package>javax.naming, javax.naming.spi, javax.sql, javax.transaction;version="1.3.3"</Import-Package>
|
|
@ -14,7 +14,7 @@ jdbc
|
|||
ee8-annotations
|
||||
|
||||
[files]
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-mock-resources/${jetty.version}/jar|lib/ee8/ee8-demo-mock-resources-${jetty.version}.jar
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-mock-resources/${jetty.version}/jar|lib/ee8/ee8-demo-mock-resources-${jetty.version}.jar
|
||||
|
||||
[lib]
|
||||
lib/ee8/ee8-demo-mock-resources-${jetty.version}.jar
|
|
@ -3,23 +3,24 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-simple-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-simple-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: Simple WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: Simple WebApp</name>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.simple</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-simple-webapp</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.simple</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-simple-webapp</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -13,4 +13,4 @@ ee8-deploy
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-simple.properties|webapps/ee8-demo-simple.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-simple-webapp/${jetty.version}/war|webapps/ee8-demo-simple.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-simple-webapp/${jetty.version}/war|webapps/ee8-demo-simple.war
|
|
@ -2,21 +2,22 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-spec</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-spec</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-container-initializer</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-container-initializer</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>EE8 :: Demo :: Servlet Spec :: ServletContainerInitializer Jar</name>
|
||||
<name>Servlet 4 :: Demo :: Servlet Spec :: ServletContainerInitializer Jar</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.sci</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-container-initializer</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.sci</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-spec/jetty-servlet5-demo-container-initializer</ee9.module>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -28,7 +29,7 @@
|
|||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>org.eclipse.jetty.ee8.demos.ee8-demo-servlet-container-initializer;singleton:=true</Bundle-SymbolicName>
|
||||
<Bundle-SymbolicName>org.eclipse.jetty.demos.ee8-demo-servlet-container-initializer;singleton:=true</Bundle-SymbolicName>
|
||||
<Bundle-Description>A bundle containing a ServletContainerInitializer for testing</Bundle-Description>
|
||||
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
|
||||
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer</Provide-Capability>
|
|
@ -2,81 +2,51 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-spec</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-spec</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-spec-webapp</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-spec-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE8 :: Demo :: Servlet Spec :: WebApp</name>
|
||||
<name>Servlet 4 :: Demo :: Servlet Spec :: WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.spec.webapp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.spec.webapp</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-spec/jetty-servlet5-demo-spec-webapp</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-container-initializer</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-container-initializer</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-web-fragment</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-web-fragment</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>${ee8.jakarta.annotation.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.transaction</groupId>
|
||||
<artifactId>jakarta.transaction-api</artifactId>
|
||||
<version>${ee8.jakarta.transaction-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.ee8</groupId>
|
||||
<artifactId>jetty-ee8-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<configuration>
|
||||
<scan>10</scan>
|
||||
<contextXml>${project.build.directory}/plugin-context.xml</contextXml>
|
||||
<webApp>
|
||||
<war>src/main/webapp</war>
|
||||
<descriptor>src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
<contextPath>/test-spec</contextPath>
|
||||
<containerIncludeJarPattern>.*/jetty-jakarta-servlet-api-[^/]*\.jar$</containerIncludeJarPattern>
|
||||
<configurationDiscovered>true</configurationDiscovered>
|
||||
<jettyEnvXml>${basedir}/src/main/webapp/WEB-INF/jetty-env.xml</jettyEnvXml>
|
||||
</webApp>
|
||||
<loginServices>
|
||||
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
|
||||
<name>Test Realm</name>
|
||||
<config>${project.build.directory}/realm.properties</config>
|
||||
</loginService>
|
||||
</loginServices>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-mock-resources</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
@ -86,14 +56,13 @@
|
|||
<supportedProjectType>war</supportedProjectType>
|
||||
</supportedProjectTypes>
|
||||
<instructions>
|
||||
<Bundle-Description>Test Webapp for Servlet 5.0 Features</Bundle-Description>
|
||||
<!-- TODO Add 'org.eclipse.jetty.util;version="[9.4.19,9.4.20)",' below, once 9.4.19 is released with a fix for #3726 -->
|
||||
<Bundle-Description>Test Webapp for Servlet 4.0 Features</Bundle-Description>
|
||||
<Import-Package>javax.transaction*;version="[1.1,2.0)", javax.servlet*;version="[2.6,4.1)", org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", *</Import-Package>
|
||||
<_nouses></_nouses>
|
||||
<Export-Package>org.example.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true</Export-Package>
|
||||
<Web-ContextPath>/</Web-ContextPath>
|
||||
<Bundle-ClassPath>.,WEB-INF/classes,WEB-INF/lib</Bundle-ClassPath>
|
||||
<Jetty-ContextFilePath>META-INF/plugin-context.xml</Jetty-ContextFilePath>
|
||||
<Jetty-ContextFilePath>META-INF/ee8-plugin-context.xml</Jetty-ContextFilePath>
|
||||
<Jetty-Environment>ee8</Jetty-Environment>
|
||||
</instructions>
|
||||
</configuration>
|
||||
|
@ -110,7 +79,7 @@
|
|||
<phase>package</phase>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/web-bundle.xml</descriptor>
|
||||
<descriptor>src/main/assembly/web-bundle-ee8.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
|
@ -131,8 +100,8 @@
|
|||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-mock-resources</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-mock-resources</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
<includes>**</includes>
|
||||
|
@ -179,7 +148,7 @@
|
|||
<outputDirectory>${project.build.directory}/realm</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${ee9.module.path}/src/etc</directory>
|
||||
<directory>${servlet5.module.path}/src/etc</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
|
@ -200,12 +169,15 @@
|
|||
<filtering>true</filtering>
|
||||
<directory>${ee9.module.path}/src/main/templates</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/templates</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- also make this webapp an osgi bundle -->
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
|
@ -216,7 +188,7 @@
|
|||
<resource>
|
||||
<directory>target/templates</directory>
|
||||
<includes>
|
||||
<include>plugin-context.xml</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<targetPath>META-INF</targetPath>
|
||||
</resource>
|
|
@ -1,7 +1,7 @@
|
|||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>webbundle</id>
|
||||
<id>webbundle-ee8</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
|
@ -22,4 +22,4 @@ ee8-demo-mock-resources
|
|||
[files]
|
||||
basehome:modules/demo.d/ee8-demo-spec.xml|webapps/ee8-demo-spec.xml
|
||||
basehome:modules/demo.d/ee8-demo-spec.properties|webapps/ee8-demo-spec.properties
|
||||
maven://org.eclipse.jetty.ee8.demos/jetty-ee8-demo-spec-webapp/${jetty.version}/war|webapps/ee8-demo-spec.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet4-demo-spec-webapp/${jetty.version}/war|webapps/ee8-demo-spec.war
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure id="wac" class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
|
||||
<New id="tx" class="org.eclipse.jetty.ee8.plus.jndi.Transaction">
|
||||
<Arg><Property name="environment" default="ee8"/></Arg>
|
||||
<Arg>
|
||||
<New class="org.example.MockUserTransaction" />
|
||||
</Arg>
|
||||
</New>
|
||||
|
||||
<New id="maxAmount" class="org.eclipse.jetty.plus.jndi.EnvEntry">
|
||||
<Arg>
|
||||
<Ref refid='wac' />
|
||||
</Arg>
|
||||
<Arg>maxAmount</Arg>
|
||||
<Arg type="java.lang.Double">100</Arg>
|
||||
<Arg type="boolean">true</Arg>
|
||||
</New>
|
||||
|
||||
<New id="mydatasource" class="org.eclipse.jetty.plus.jndi.Resource">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>jdbc/mydatasource</Arg>
|
||||
<Arg>
|
||||
<New class="org.example.MockDataSource">
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
</Configure>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure id='wac' class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
|
||||
|
||||
<!-- Add an override for a global EnvEntry -->
|
||||
<New id="maxAmount" class="org.eclipse.jetty.plus.jndi.EnvEntry">
|
||||
<Arg><Ref refid='wac'/></Arg>
|
||||
<Arg>maxAmount</Arg>
|
||||
<Arg type="java.lang.Double">55.0</Arg>
|
||||
<Arg type="boolean">true</Arg>
|
||||
</New>
|
||||
|
||||
|
||||
</Configure>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
|
||||
|
||||
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log">
|
||||
<Arg>The ee8-demo-spec webapp is deployed. DO NOT USE IN PRODUCTION!</Arg>
|
||||
<Arg></Arg>
|
||||
</Call>
|
||||
</Get>
|
||||
<Call class="org.slf4j.LoggerFactory" name="getLogger">
|
||||
<Arg>org.eclipse.jetty</Arg>
|
||||
<Call name="info">
|
||||
<Arg>WEB-INF/lib/jetty-util.jar logging used!</Arg>
|
||||
</Call>
|
||||
</Call>
|
||||
</Configure>
|
|
@ -2,24 +2,25 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demo-spec</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demo-spec</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-web-fragment</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-web-fragment</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>EE8 :: Demo :: Servlet Spec :: Fragment Jar</name>
|
||||
<name>Servlet 4 :: Demo :: Servlet Spec :: Fragment Jar</name>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.spec.fragment</bundle-symbolic-name>
|
||||
<ee9.module>jetty-ee9-demos/jetty-ee9-demo-spec/jetty-ee9-demo-web-fragment</ee9.module>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet4.spec.fragment</bundle-symbolic-name>
|
||||
<ee9.module>jetty-servlet5-demo-spec/jetty-servlet5-demo-web-fragment</ee9.module>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-servlet-api</artifactId>
|
||||
<version>${ee8.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -1,20 +1,18 @@
|
|||
<?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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee11.demos</groupId>
|
||||
<artifactId>jetty-ee11-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee11-demo-async-rest</artifactId>
|
||||
<artifactId>jetty-servlet4-demo-spec</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>EE11 :: Demo :: Async Rest</name>
|
||||
<name>Servlet 4 :: Demo :: Servlet Spec</name>
|
||||
|
||||
<modules>
|
||||
<module>jetty-ee11-demo-async-rest-jar</module>
|
||||
<module>jetty-ee11-demo-async-rest-server</module>
|
||||
<module>jetty-ee11-demo-async-rest-webapp</module>
|
||||
<module>jetty-servlet4-demo-container-initializer</module>
|
||||
<module>jetty-servlet4-demo-spec-webapp</module>
|
||||
<module>jetty-servlet4-demo-web-fragment</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,198 @@
|
|||
<?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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet4-demos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Servlet 4 :: Demos</name>
|
||||
|
||||
<modules>
|
||||
<module>jetty-servlet4-demo-async-rest</module>
|
||||
<module>jetty-servlet4-demo-jaas-webapp</module>
|
||||
<module>jetty-servlet4-demo-javax-websocket-webapp</module>
|
||||
<module>jetty-servlet4-demo-jetty-webapp</module>
|
||||
<module>jetty-servlet4-demo-jndi-webapp</module>
|
||||
<module>jetty-servlet4-demo-jsp-webapp</module>
|
||||
<module>jetty-servlet4-demo-mock-resources</module>
|
||||
<module>jetty-servlet4-demo-simple-webapp</module>
|
||||
<module>jetty-servlet4-demo-spec</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<ee9.module></ee9.module>
|
||||
<ee9.module.path>${maven.multiModuleProjectDirectory}/jetty-demos/jetty-servlet5-demos/${ee9.module}</ee9.module.path>
|
||||
<modify-sources-plugin.version>1.0.11</modify-sources-plugin.version>
|
||||
<sonar.skip>true</sonar.skip>
|
||||
<warSourceDirectory>${project.build.directory}/webapp</warSourceDirectory>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- otherwise javadoc jars for these demos will not be created due to top level pom exclusions on "org.example" -->
|
||||
<excludePackageNames>bogus.*</excludePackageNames>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<warSourceDirectory>${warSourceDirectory}</warSourceDirectory>
|
||||
<failOnMissingWebXml>true</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-modify-sources-maven-plugin</artifactId>
|
||||
<version>${modify-sources-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- otherwise javadoc jars for these demos will not be created due to top level pom exclusions on "org.example" -->
|
||||
<excludePackageNames>bogus.*</excludePackageNames>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<nonFilteredFileExtensions>
|
||||
<nonFilteredFileExtension>p12</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>raw</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>war</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>tga</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>gz</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>tif</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>tiff</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>svgz</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>jp2</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>rar</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>bz2</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>br</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>xcf</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>icon</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>png</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>webp</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>gif</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>bmp</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>jpg</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>jpeg</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>rar</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>xcf</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>sha1</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>png</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>sha</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>clazz</nonFilteredFileExtension>
|
||||
</nonFilteredFileExtensions>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-filtering</artifactId>
|
||||
<version>3.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-modify-sources-maven-plugin</artifactId>
|
||||
<version>${modify-sources-plugin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-ee8-resources</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
<mavenFilteringHints>
|
||||
<mavenFilteringHint>ee9-to-ee8</mavenFilteringHint>
|
||||
</mavenFilteringHints>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>${ee9.module.path}/src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-ee8-webapp-resources</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<mavenFilteringHints>
|
||||
<mavenFilteringHint>ee9-to-ee8</mavenFilteringHint>
|
||||
</mavenFilteringHints>
|
||||
<outputDirectory>${project.build.directory}/webapp</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>${ee9.module.path}/src/main/webapp</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<filtering>false</filtering>
|
||||
<directory>src/main/webapp</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-modify-sources-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-ee8-sources</id>
|
||||
<goals>
|
||||
<goal>modify-sources-ee9-to-ee8</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<sourceProjectLocation>${ee9.module.path}/src/main/java</sourceProjectLocation>
|
||||
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>modify-services-loader-ee9-to-ee8</id>
|
||||
<goals>
|
||||
<goal>modify-service-loader-files-ee9-to-ee8</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<extraFileNames>
|
||||
<extraFileName>org.apache.juli.logging.Log</extraFileName>
|
||||
</extraFileNames>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<sourceDirectory>${project.build.directory}/generated-sources/ee8</sourceDirectory>
|
||||
</build>
|
||||
</project>
|
|
@ -3,30 +3,33 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee9.demos</groupId>
|
||||
<artifactId>jetty-ee9-demo-async-rest</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee9-demo-async-rest-jar</artifactId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest-jar</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>EE9 :: Demo :: Async Rest :: Jar</name>
|
||||
<name>Servlet 5 :: Demo :: Async Rest :: Jar</name>
|
||||
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.parent.groupId}.async.rest</bundle-symbolic-name>
|
||||
<bundle-symbolic-name>${project.parent.groupId}.servlet5.async.rest</bundle-symbolic-name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util-ajax</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-jakarta-servlet-api</artifactId>
|
||||
<version>${ee9.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee9.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee9.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
|
@ -11,7 +11,7 @@
|
|||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee9.demos;
|
||||
package org.eclipse.jetty.demos;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 164 B |
|
@ -8,7 +8,7 @@
|
|||
<servlet>
|
||||
<display-name>SerialRestServlet</display-name>
|
||||
<servlet-name>SerialRestServlet</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.ee9.demos.SerialRestServlet</servlet-class>
|
||||
<servlet-class>org.eclipse.jetty.demos.SerialRestServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>SerialRestServlet</servlet-name>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<servlet>
|
||||
<display-name>AsyncRestServlet</display-name>
|
||||
<servlet-name>AsyncRestServlet</servlet-name>
|
||||
<servlet-class>org.eclipse.jetty.ee9.demos.AsyncRestServlet</servlet-class>
|
||||
<servlet-class>org.eclipse.jetty.demos.AsyncRestServlet</servlet-class>
|
||||
<async-supported>true</async-supported>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee9.demos</groupId>
|
||||
<artifactId>jetty-ee9-demo-async-rest</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee9-demo-async-rest-webapp</artifactId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE9 :: Demo :: Async Rest :: WebApp</name>
|
||||
<name>Servlet 5 :: Demo :: Async Rest :: WebApp</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -18,8 +18,9 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.ee9.demos</groupId>
|
||||
<artifactId>jetty-ee9-demo-async-rest-jar</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest-jar</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-jakarta-servlet-api</artifactId>
|
||||
<version>${ee9.jetty.servlet.api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
|
@ -14,5 +14,5 @@ webapp
|
|||
ee10-deploy
|
||||
|
||||
[files]
|
||||
maven://org.eclipse.jetty.ee10.demos/jetty-ee10-demo-async-rest-webapp/${jetty.version}/war|webapps/ee10-demo-async-rest.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-async-rest-webapp/${jetty.version}/war|webapps/ee10-demo-async-rest.war
|
||||
|
|
@ -14,5 +14,5 @@ webapp
|
|||
ee11-deploy
|
||||
|
||||
[files]
|
||||
maven://org.eclipse.jetty.ee11.demos/jetty-ee11-demo-async-rest-webapp/${jetty.version}/war|webapps/ee11-demo-async-rest.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-async-rest-webapp/${jetty.version}/war|webapps/ee11-demo-async-rest.war
|
||||
|
|
@ -15,4 +15,4 @@ ee9-deploy
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee9-demo-async-rest.properties|webapps/ee9-demo-async-rest.properties
|
||||
maven://org.eclipse.jetty.ee9.demos/jetty-ee9-demo-async-rest-webapp/${jetty.version}/war|webapps/ee9-demo-async-rest.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-async-rest-webapp/${jetty.version}/war|webapps/ee9-demo-async-rest.war
|
|
@ -10,6 +10,6 @@ org.eclipse.jetty.ee10.servlet.WebApplicationContext object
|
|||
|
||||
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The async-rest webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
<Call name="log"><Arg>The ee10-demo-async-rest webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -10,6 +10,6 @@ org.eclipse.jetty.ee11.servlet.WebApplicationContext object
|
|||
|
||||
<Configure class="org.eclipse.jetty.ee11.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The async-rest webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
<Call name="log"><Arg>The ee11-demo-async-rest webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -9,7 +9,7 @@
|
|||
<body>
|
||||
<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-12.0.x/jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-async-rest/jetty-ee9-demo-async-rest-webapp/">Source</a>
|
||||
<a class="menu" href="https://github.com/eclipse/jetty.project/tree/jetty-12.0.x/jetty-demos/jetty-servlet5-demos/jetty-servlet5-demo-async-rest/jetty-servlet5-demo-async-rest-webapp/">Source</a>
|
||||
<a class="menu" href="https://eclipse.dev/jetty/">Jetty Project Home</a>
|
||||
<a class="menu" href="https://eclipse.dev/jetty/documentation/">Documentation</a>
|
||||
<a class="menu" href="https://webtide.com">Commercial Support</a>
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
@ -1,18 +1,19 @@
|
|||
<?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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee8.demos</groupId>
|
||||
<artifactId>jetty-ee8-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet5-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee8-demo-spec</artifactId>
|
||||
<artifactId>jetty-servlet5-demo-async-rest</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>EE8 :: Demo :: Servlet Spec</name>
|
||||
<name>Servlet 5 :: Demo :: Async Rest</name>
|
||||
|
||||
<modules>
|
||||
<module>jetty-ee8-demo-container-initializer</module>
|
||||
<module>jetty-ee8-demo-spec-webapp</module>
|
||||
<module>jetty-ee8-demo-web-fragment</module>
|
||||
<module>jetty-servlet5-demo-async-rest-jar</module>
|
||||
<module>jetty-servlet5-demo-async-rest-webapp</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -2,35 +2,35 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.jetty.ee9.demos</groupId>
|
||||
<artifactId>jetty-ee9-demos</artifactId>
|
||||
<groupId>org.eclipse.jetty.demos</groupId>
|
||||
<artifactId>jetty-servlet5-demos</artifactId>
|
||||
<version>12.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-ee9-demo-jaas-webapp</artifactId>
|
||||
<artifactId>jetty-servlet5-demo-jaas-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>EE9 :: Demo :: JAAS WebApp</name>
|
||||
<name>Servlet 5 :: Demo :: JAAS WebApp</name>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.jaas</bundle-symbolic-name>
|
||||
<bundle-symbolic-name>${project.groupId}.servlet5.jaas</bundle-symbolic-name>
|
||||
</properties>
|
||||
<build>
|
||||
<!-- pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty.ee9</groupId>
|
||||
<groupId>org.eclipse.jetty.servlet5</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<configuration>
|
||||
<scan>10</scan>
|
||||
<systemProperties>
|
||||
<jetty.base>${basedir}/src/main/config/modules/demo.d</jetty.base>
|
||||
<java.security.auth.login.config>${basedir}/src/main/etc/ee9-demo-login.conf</java.security.auth.login.config>
|
||||
<java.security.auth.login.config>${basedir}/src/main/etc/servlet5-demo-login.conf</java.security.auth.login.config>
|
||||
</systemProperties>
|
||||
<webApp>
|
||||
<contextPath>/test-jaas</contextPath>
|
||||
<securityHandler implementation="org.eclipse.jetty.security.ConstraintSecurityHandler">
|
||||
<loginService implementation="org.eclipse.jetty.security.jaas.JAASLoginService">
|
||||
<name>Test JAAS Realm</name>
|
||||
<loginModuleName>ee9-xyz</loginModuleName>
|
||||
<loginModuleName>servlet5-xyz</loginModuleName>
|
||||
</loginService>
|
||||
</securityHandler>
|
||||
</webApp>
|
|
@ -0,0 +1 @@
|
|||
environment: ee10
|
|
@ -0,0 +1 @@
|
|||
environment: ee11
|
|
@ -21,4 +21,4 @@ ext
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee10-demo-jaas.xml|webapps/ee10-demo-jaas.xml
|
||||
maven://org.eclipse.jetty.ee10.demos/jetty-ee10-demo-jaas-webapp/${jetty.version}/war|webapps/ee10-demo-jaas.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-jaas-webapp/${jetty.version}/war|webapps/ee10-demo-jaas.war
|
|
@ -21,4 +21,4 @@ ext
|
|||
|
||||
[files]
|
||||
basehome:modules/demo.d/ee11-demo-jaas.xml|webapps/ee11-demo-jaas.xml
|
||||
maven://org.eclipse.jetty.ee11.demos/jetty-ee11-demo-jaas-webapp/${jetty.version}/war|webapps/ee11-demo-jaas.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-jaas-webapp/${jetty.version}/war|webapps/ee11-demo-jaas.war
|
|
@ -22,4 +22,4 @@ ext
|
|||
[files]
|
||||
basehome:modules/demo.d/ee9-demo-jaas.xml|webapps/ee9-demo-jaas.xml
|
||||
basehome:modules/demo.d/ee9-demo-jaas.properties|webapps/ee9-demo-jaas.properties
|
||||
maven://org.eclipse.jetty.ee9.demos/jetty-ee9-demo-jaas-webapp/${jetty.version}/war|webapps/ee9-demo-jaas.war
|
||||
maven://org.eclipse.jetty.demos/jetty-servlet5-demo-jaas-webapp/${jetty.version}/war|webapps/ee9-demo-jaas.war
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
<Configure class="org.eclipse.jetty.ee10.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The test-jndi webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
<Call name="log"><Arg>The ee10-demo-jaas webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
<Configure class="org.eclipse.jetty.ee11.webapp.WebAppContext">
|
||||
<Get name="servletContext">
|
||||
<Call name="log"><Arg>The test-jndi webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
<Call name="log"><Arg>The ee11-demo-jaas webapp is deployed. DO NOT USE IN PRODUCTION!</Arg><Arg></Arg></Call>
|
||||
</Get>
|
||||
</Configure>
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
version="2.5">
|
||||
|
||||
<display-name>EE9 Demo JAAS WebApp</display-name>
|
||||
<display-name>Servlet 5 Demo JAAS WebApp</display-name>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue