package com.mycode;

import java.util.Optional;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.webapp.WebInfConfiguration;

public class App {

    public static void main(String[] args) throws Exception {

        String portString = Optional.ofNullable(System.getenv("PORT"))
                .orElse("8080");
        int port = Integer.parseInt(portString);
        Server server = new Server(port);

        WebAppContext ctx = new WebAppContext();
        ctx.setResourceBase("src/main/webapp/public");
//        ctx.setContextPath("/shop");
        ServletHandler handler = new ServletHandler();
        handler.addServletWithMapping(FruitsServlet.class, "/fruitsServlet");
        ctx.setServletHandler(handler);

        /* おまじない ここから */
        ctx.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/[^/]*jstl.*\\.jar$");
        // http://localhost:8080/webjars/jquery/2.2.3/jquery.min.js
        // http://www.programcreek.com/java-api-examples/index.php?api=org.eclipse.jetty.webapp.WebInfConfiguration
        // Example 17
        ctx.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/org\\.eclipse\\.xtext\\.web.*,.*/org.webjars.*");
        ctx.setClassLoader(App.class.getClassLoader());
        org.eclipse.jetty.webapp.Configuration.ClassList classlist = org.eclipse.jetty.webapp.Configuration.ClassList.setServerDefault(server);
        classlist.addAfter("org.eclipse.jetty.webapp.FragmentConfiguration", "org.eclipse.jetty.plus.webapp.EnvConfiguration", "org.eclipse.jetty.plus.webapp.PlusConfiguration");
        classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration", "org.eclipse.jetty.annotations.AnnotationConfiguration");
        /* おまじない ここまで */

        server.setHandler(ctx);
        server.start();
        server.join();
    }
}

package com.mycode;

import java.util.Optional;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.util.resource.ResourceCollection;
import org.eclipse.jetty.webapp.WebAppContext;

public class App {

    public static void main(String[] args) throws Exception {

        String portString = Optional.ofNullable(System.getenv("PORT"))
                .orElse("8080");
        int port = Integer.parseInt(portString);
        Server server = new Server(port);

        WebAppContext ctx = new WebAppContext();
        ResourceCollection resources = new ResourceCollection(new String[]{
            "src/main/webapp/public",
            App.class.getClassLoader().getResource("META-INF/resources/").toURI().toString()
        });

        ctx.setBaseResource(resources);
//        ctx.setContextPath("/shop");
        ServletHandler handler = new ServletHandler();
        handler.addServletWithMapping(FruitsServlet.class, "/fruitsServlet");
        ctx.setServletHandler(handler);

        /* おまじない ここから */
        ctx.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/[^/]*jstl.*\\.jar$");
        org.eclipse.jetty.webapp.Configuration.ClassList classlist = org.eclipse.jetty.webapp.Configuration.ClassList.setServerDefault(server);
        classlist.addAfter("org.eclipse.jetty.webapp.FragmentConfiguration", "org.eclipse.jetty.plus.webapp.EnvConfiguration", "org.eclipse.jetty.plus.webapp.PlusConfiguration");
        classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration", "org.eclipse.jetty.annotations.AnnotationConfiguration");
        /* おまじない ここまで */

        server.setHandler(ctx);
        server.start();
        server.join();
    }
}

modify Procfile