Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7816331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:49:49+00:00 2026-06-02T05:49:49+00:00

I have a feeling I’ve missed something obvious here, but I don’t know where

  • 0

I have a feeling I’ve missed something obvious here, but I don’t know where to start looking.

I have a fresh noir app, created thusly:

$ lein noir new hiworld

I add a new page handler to src/hiworld/server.clj:

(ns hiworld.server
  (:require [noir.server :as server]))
(server/load-views "src/hiworld/views/")

(def handler (server/gen-handler {:mode :dev
                                  :ns 'hiworld}))

I set project.clj up for ring:

(defproject hiworld "0.1.0-SNAPSHOT"
            :description "FIXME: write this!"
            :dependencies [[org.clojure/clojure "1.3.0"]
                           [noir "1.2.2-SNAPSHOT"]]
            :dev-dependencies [[lein-ring "0.5.4"]]
            :ring {:handler hiworld.server/handler}
            :main hiworld.server)

Check it works locally:

$ lein deps
$ lein ring server-headless
# elsewhere
$ curl -I localhost:3000/welcome
HTTP/1.1 200 OK
Date: Mon, 20 Feb 2012 08:51:15 GMT
Set-Cookie: ring-session=ef00a7ad-2061-4026-9d94-3ed86ec8c46c;Path=/
Content-Type: text/html; charset=utf-8
Content-Length: 0
Server: Jetty(6.1.25)

I build a war:

$ lein ring uberwar
# builds hiworld-0.1.0-SNAPSHOT-standalone.war

All good so far. Now, I deploy it to jetty:

$ sudo apt-get install jetty libjetty-extra
$ sudo cp hiworld-0.1.0-SNAPSHOT-standalone.war /usr/share/jetty/webapps/root.war
$ sudo chown jetty:adm /usr/share/jetty/webapps/root.war
$ sudo mv /usr/share/jetty/webapps/root /usr/share/jetty/webapps/root-orig
$ sudo /etc/init.d/jetty restart

But:

$ curl -I localhost:8080/welcome
HTTP/1.1 404 Not Found
Date: Mon, 20 Feb 2012 08:59:27 GMT
Set-Cookie: ring-session=c255da15-6cbd-4d2c-8e17-9d120918bde9;Path=/
Content-Type: text/html; charset=utf-8
Content-Length: 363
Server: Jetty(6.1.24)

What did I miss? As far as I can tell, that should be all I need to do to deploy a trivial web-app to jetty, but evidently I’ve got something wrong here. I don’t mind the restart, so I don’t think I need to define my own context – or do I?

UPDATE

I’ve followed this sequence of instructions to create a simple “hello world” war not involving clojure at all, and it works as expected, so it would appear that there’s something Not Quite Right with the clojure stack.

UPDATED AGAIN

I created the simplest possible ring app as a standalone war and deployed it. This worked, so it looks like it’s something noir-specific.

UPDATED A THIRD TIME

I created and deployed a hello-world compojure app, which worked as expected.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:49:52+00:00Added an answer on June 2, 2026 at 5:49 am

    I also had this problem. I found the solution on the Noir mailing list here.

    In server.clj I did two things: I removed the (server/loadviews) call, and added my views to the required namespaces.

    I then built my project with the command lein ring uberwar warname.war.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling this is something very obvious that I'm missing, but here
I have a feeling I'm missing something pretty simple here but, in this one
I have a feeling I'm doing something wrong here, but I'm not quite sure
I have a feeling that I'm missing something simple here but can't seem to
I have a feeling I'm missing something simple here, but just can't quite grok
I have a feeling this has already been answered, but I don't know the
I have a feeling that I'm missing something obvious but can't seem to resolve
I have a feeling of missing something obvious. UDP receiver application. It holds a
I have a feeling my problem is a bit strange, but here goes... I
I have a feeling I may already know the answer to this question, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.