Improved sample webapp, now to be run using mvn jetty:run-forked
and working with out-of-the-box Chromium.
This commit is contained in:
parent
2640e80101
commit
3f5a35024e
|
@ -20,11 +20,14 @@
|
|||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<configuration>
|
||||
<connectors>
|
||||
<connector implementation="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector">
|
||||
<port>8080</port>
|
||||
</connector>
|
||||
</connectors>
|
||||
<stopPort>8888</stopPort>
|
||||
<stopKey>quit</stopKey>
|
||||
<jvmArgs>
|
||||
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
-Dlog4j.configuration=file://${basedir}/src/main/resources/log4j.properties
|
||||
-Xbootclasspath/p:${settings.localRepository}/org/eclipse/jetty/npn-boot/${npn.version}/npn-boot-${npn.version}.jar
|
||||
</jvmArgs>
|
||||
<jettyXml>${basedir}/src/main/config/jetty-spdy.xml</jettyXml>
|
||||
<webAppConfig>
|
||||
<contextPath>/</contextPath>
|
||||
</webAppConfig>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
||||
|
||||
<Configure id="server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
|
||||
<Set name="keyStorePath">src/main/resources/keystore.jks</Set>
|
||||
<Set name="keyStorePassword">storepwd</Set>
|
||||
<Set name="trustStore">src/main/resources/truststore.jks</Set>
|
||||
<Set name="trustStorePassword">storepwd</Set>
|
||||
<Set name="protocol">TLSv1</Set>
|
||||
<Set name="includeProtocols">
|
||||
<Array type="java.lang.String">
|
||||
<Item>TLSv1</Item>
|
||||
<Item>TLSv1.1</Item>
|
||||
<Item>TLSv1.2</Item>
|
||||
</Array>
|
||||
</Set>
|
||||
</New>
|
||||
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector">
|
||||
<Set name="Port">8080</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector">
|
||||
<Arg>
|
||||
<Ref id="sslContextFactory" />
|
||||
</Arg>
|
||||
<Set name="Port">8443</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
Binary file not shown.
|
@ -10,5 +10,7 @@ log4j.appender.CONSOLE.layout.ConversionPattern=%d %t [%5p][%c] %m%n
|
|||
log4j.appender.CONSOLE.target=System.err
|
||||
|
||||
# Level tuning
|
||||
log4j.logger.jndi=INFO
|
||||
log4j.logger.org.mortbay.jetty=INFO
|
||||
log4j.logger.org.eclipse.jetty=INFO
|
||||
log4j.logger.org.eclipse.jetty.spdy=DEBUG
|
||||
|
|
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
function submit()
|
||||
{
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "/form.jsp", false);
|
||||
xhr.open("POST", "${pageContext.request.contextPath}/form.jsp", false);
|
||||
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
|
||||
xhr.send("param=1");
|
||||
window.document.getElementById("form").innerHTML = xhr.responseText;
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<div id="image">
|
||||
<p>Below there should be an image</p>
|
||||
<img src="${requestScope.contextPath}/logo.jpg" alt="logo" />
|
||||
<img src="${pageContext.request.contextPath}/logo.jpg" alt="logo" />
|
||||
</div>
|
||||
<div>
|
||||
<jsp:include page="included.jsp" />
|
||||
|
|
Loading…
Reference in New Issue