Search code examples
jettyvaadinjetty-9vaadin22

Vaadin 22 Starter not working in a standalone instance of Jetty v9


I have cloned from https://github.com/vaadin/skeleton-starter-flow/tree/v22

I produce a .war file (project-base-1.0-SNAPSHOT.war) in the target directory using, mvn package -Pproduction

I pop the .war into the webapps directory of a standalone instance of Jetty v9.4.46

Using Chrome, I open http://localhost:8080/project-base-1.0-SNAPSHOT/ and all I get is a directory listing.

Doing the same thing with standalone Tomcat (v8.5.78) works as expected.

Running, mvn jetty:run also works as expected

It doesn't work with Jetty v10.0.9 either

Am I missing something obvious?


Solution

  • Maybe the Jetty logs show is something is wrong with your Jetty but what you do works fine for me:

    git clone https://github.com/vaadin/skeleton-starter-flow.git
    cd skeleton-starter-flow
    git checkout v22
    mvn package -Pproduction
    wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.46.v20220331/jetty-distribution-9.4.46.v20220331.tar.gz
    tar zxvf jetty-distribution-9.4.46.v20220331.tar.gz
    cp target/project-base-1.0-SNAPSHOT.war jetty-distribution-9.4.46.v20220331/webapps
    cd jetty-distribution-9.4.46.v20220331
    bin/jetty.sh run
    

    Then http://localhost:8080/project-base-1.0-SNAPSHOT/ shows the application with a text field and a button