boot-clj / boot-clj/boot

war file doesn't work with Tomcat8/Jetty8

Open
#345 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Clojure
Stars
1.7k
Forks
178
PR merge metrics
No merged PRs in 30d

Description

I've issueing some problems with hoplon-castra application. Looking for the root of the problems I've noticed that if I make fresh project from template and generate war file

``` bash
lein new hoplon-castra testprj
cd testprj
boot make-war
sudo cp target/project.war /var/lib/jetty8/webapps
```

nothing happens when I open http://localhost:8080/project.

Meanwhile, If I make dummy Ring project:

``` clojure
(defproject test2 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring/ring-core "1.4.0"]
[ring/ring-jetty-adapter "1.4.0"]]
:plugins [[lein-ring "0.9.7"]]
:ring {:handler test2.core/handler})
```

``` clojure
(ns test2.core)

(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Ring Test"})
```

and produce .war file for that app:

``` bash
lein ring uberwar
sudo cp target/test2-0.1.0-SNAPSHOT-standalone.war /var/lib/jetty8/webapps/test2.war
```

I see "Ring Test" at http://localhost:8080/test2 as I assume.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the shown `lein new hoplon-castra`, `boot make-war`, and Jetty8 deployment commands, then compare the generated WAR with the working `lein ring uberwar` result. Inspect the project template and WAR-generation entry points to identify why the deployed application does not respond; done means the template-generated WAR serves the application at `/project` on Jetty8.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
backend, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.