├── .gitignore ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── readme ├── http1.PNG └── http2.PNG └── src └── main ├── java └── app │ └── Main.java ├── kotlin └── app │ └── Main.kt └── resources ├── keystore.jks └── public ├── css ├── css1.css ├── css2.css ├── css3.css ├── css4.css ├── css5.css ├── css6.css ├── css7.css ├── css8.css └── css9.css ├── img ├── lama1.jpg ├── lama2.jpg ├── lama3.jpg ├── lama4.jpg ├── lama5.jpg ├── lama6.jpg ├── lama7.jpg ├── lama8.jpg └── lama9.jpg ├── js ├── js1.js ├── js2.js ├── js3.js ├── js4.js ├── js5.js ├── js6.js ├── js7.js ├── js8.js └── js9.js └── static-files-test.html /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .gradle 3 | build/ 4 | .idea 5 | *.iml 6 | *.ipr 7 | *.iws 8 | out/ 9 | keystore.p12 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A fully working HTTP2 example with Jetty and Javalin 2 | 3 | Javalin will run on any embedded Jetty server, and Jetty supports HTTP2 (with a few additional dependencies). This guide explains how to set it all up. 4 | 5 | The example includes a generated keystore, but you'll need to [generate your own](https://support.globalsign.com/customer/en/portal/articles/2121490-java-keytool---create-keystore) if you intended to use this for anything: 6 | 7 | * Open a command prompt in the same directory as Java keytool and run: 8 | * `keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048` 9 | 10 | The example uses Conscrypt as the SSL provider, which is [recommended by Jetty](https://webtide.com/conscrypting-native-ssl-for-jetty/). 11 | 12 | The ALPN API version you need to use is specific to your JDK version. Find your correct version in the [Jetty docs](https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-versions) 13 | 14 | The example has a HTTP1.1 connector on port 8080 and HTTP2 connector on 8443 (with fallback to SSL HTTP 1.1). 15 | 16 | To verify that everything is working, open Chrome (or your browser of choice), go to https://localhost:8443, and open the network tab in the devtols. You should see "h2" in the "Protocol" column. 17 | 18 | If you go to `/static-files-test.html`, open the Network tab and set your emulated network to 3G, you'll notice the difference: 19 | 20 | **Note: WebSockets via HTTP2 are [currently not supported](https://github.com/eclipse/jetty.project/issues/4900) by the Jetty version used by Javalin. This functionality will be available in the upcoming Jetty version 10.0.** 21 | 22 | ### HTTP1.1 23 |  24 | 25 | ### HTTP2 26 |  27 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | group 'io.javalin' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | ext.kotlin_version = '1.5.20' 6 | repositories { 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | apply plugin: 'java' 15 | apply plugin: 'kotlin' 16 | 17 | sourceCompatibility = 1.8 18 | 19 | repositories { 20 | mavenCentral() 21 | } 22 | 23 | dependencies { 24 | def jettyVersion = '9.4.43.v20210629' 25 | def alpnBootVersion = '8.1.12.v20180117' 26 | def alpnApiVersion = '1.1.3.v20160715' 27 | def javalinVersion = '4.0.0' 28 | def slf4jVersion = '1.7.32' 29 | 30 | compile "org.eclipse.jetty.http2:http2-server:$jettyVersion" 31 | compile "org.eclipse.jetty:jetty-alpn-conscrypt-server:$jettyVersion" 32 | compile "org.eclipse.jetty.alpn:alpn-api:$alpnApiVersion" 33 | runtime "org.mortbay.jetty.alpn:alpn-boot:$alpnBootVersion" 34 | 35 | compile "io.javalin:javalin:$javalinVersion" 36 | compile "org.slf4j:slf4j-api:$slf4jVersion" 37 | runtime "org.slf4j:slf4j-simple:$slf4jVersion" 38 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" 39 | 40 | } 41 | compileKotlin { 42 | kotlinOptions { 43 | jvmTarget = "1.8" 44 | } 45 | } 46 | compileTestKotlin { 47 | kotlinOptions { 48 | jvmTarget = "1.8" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS='"-Xmx64m"' 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS="-Xmx64m" 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /readme/http1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/readme/http1.PNG -------------------------------------------------------------------------------- /readme/http2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/readme/http2.PNG -------------------------------------------------------------------------------- /src/main/java/app/Main.java: -------------------------------------------------------------------------------- 1 | package app; 2 | 3 | import io.javalin.Javalin; 4 | import io.javalin.http.staticfiles.Location; 5 | import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory; 6 | import org.eclipse.jetty.http2.HTTP2Cipher; 7 | import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; 8 | import org.eclipse.jetty.server.HttpConfiguration; 9 | import org.eclipse.jetty.server.HttpConnectionFactory; 10 | import org.eclipse.jetty.server.SecureRequestCustomizer; 11 | import org.eclipse.jetty.server.Server; 12 | import org.eclipse.jetty.server.ServerConnector; 13 | import org.eclipse.jetty.server.SslConnectionFactory; 14 | import org.eclipse.jetty.util.ssl.SslContextFactory; 15 | 16 | public class Main { 17 | 18 | public static void main(String[] args) { 19 | 20 | Javalin app = Javalin.create(config -> { 21 | config.server(Main::createHttp2Server); 22 | config.addStaticFiles("/public", Location.CLASSPATH); 23 | }).start(); 24 | 25 | app.get("/", ctx -> ctx.result("Hello World")); 26 | 27 | } 28 | 29 | private static Server createHttp2Server() { 30 | Server server = new Server(); 31 | 32 | ServerConnector connector = new ServerConnector(server); 33 | connector.setPort(8080); 34 | server.addConnector(connector); 35 | 36 | // HTTP Configuration 37 | HttpConfiguration httpConfig = new HttpConfiguration(); 38 | httpConfig.setSendServerVersion(false); 39 | httpConfig.setSecureScheme("https"); 40 | httpConfig.setSecurePort(8443); 41 | 42 | // SSL Context Factory for HTTPS and HTTP/2 43 | SslContextFactory sslContextFactory = new SslContextFactory(); 44 | sslContextFactory.setKeyStorePath(Main.class.getResource("/keystore.jks").toExternalForm()); // replace with your real keystore 45 | sslContextFactory.setKeyStorePassword("password"); // replace with your real password 46 | sslContextFactory.setCipherComparator(HTTP2Cipher.COMPARATOR); 47 | sslContextFactory.setProvider("Conscrypt"); 48 | 49 | // HTTPS Configuration 50 | HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig); 51 | httpsConfig.addCustomizer(new SecureRequestCustomizer()); 52 | 53 | // HTTP/2 Connection Factory 54 | HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(httpsConfig); 55 | ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); 56 | alpn.setDefaultProtocol("h2"); 57 | 58 | // SSL Connection Factory 59 | SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory, alpn.getProtocol()); 60 | 61 | // HTTP/2 Connector 62 | ServerConnector http2Connector = new ServerConnector(server, ssl, alpn, h2, new HttpConnectionFactory(httpsConfig)); 63 | http2Connector.setPort(8443); 64 | server.addConnector(http2Connector); 65 | 66 | return server; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/kotlin/app/Main.kt: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import io.javalin.Javalin 4 | import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory 5 | import org.eclipse.jetty.http2.HTTP2Cipher 6 | import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory 7 | import org.eclipse.jetty.server.* 8 | import org.eclipse.jetty.util.ssl.SslContextFactory 9 | 10 | fun main() { 11 | 12 | val app = Javalin.create { 13 | it.server { createHttp2Server() } 14 | it.addStaticFiles("/public") 15 | }.start() 16 | 17 | app.get("/") { it.result("Hello World") } 18 | 19 | } 20 | 21 | private fun createHttp2Server(): Server { 22 | 23 | val alpn = ALPNServerConnectionFactory().apply { 24 | defaultProtocol = "h2" 25 | } 26 | 27 | val sslContextFactory = SslContextFactory().apply { 28 | keyStorePath = Main::class.java.getResource("/keystore.jks").toExternalForm() // replace with your real keystore 29 | setKeyStorePassword("password") // replace with your real password 30 | cipherComparator = HTTP2Cipher.COMPARATOR 31 | provider = "Conscrypt" 32 | } 33 | 34 | val ssl = SslConnectionFactory(sslContextFactory, alpn.protocol) 35 | 36 | val httpsConfig = HttpConfiguration().apply { 37 | sendServerVersion = false 38 | secureScheme = "https" 39 | securePort = 8443 40 | addCustomizer(SecureRequestCustomizer()) 41 | } 42 | 43 | val http2 = HTTP2ServerConnectionFactory(httpsConfig) 44 | 45 | val fallback = HttpConnectionFactory(httpsConfig) 46 | 47 | return Server().apply { 48 | //HTTP/1.1 Connector 49 | addConnector(ServerConnector(server).apply { 50 | port = 8080 51 | }) 52 | // HTTP/2 Connector 53 | addConnector(ServerConnector(server, ssl, alpn, http2, fallback).apply { 54 | port = 8443 55 | }) 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/resources/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/keystore.jks -------------------------------------------------------------------------------- /src/main/resources/public/css/css1.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css2.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css3.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css4.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css5.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css6.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css7.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css8.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/css/css9.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | 5 | img { 6 | max-height: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/public/img/lama1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama1.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama2.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama3.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama4.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama5.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama6.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama7.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama8.jpg -------------------------------------------------------------------------------- /src/main/resources/public/img/lama9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tipsy/javalin-http2-example/5b253126ef2f2326b264305c75340d4f178a7a5b/src/main/resources/public/img/lama9.jpg -------------------------------------------------------------------------------- /src/main/resources/public/js/js1.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js2.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js3.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js4.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js5.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js6.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js7.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js8.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/js/js9.js: -------------------------------------------------------------------------------- 1 | console.log("Loaded some js"); 2 | -------------------------------------------------------------------------------- /src/main/resources/public/static-files-test.html: -------------------------------------------------------------------------------- 1 |