> You've also got a max-age of 90 for your session cookies, which would 
mean your sessions will 
> time out in 90 seconds. Is that what you want?

Yes, a painful compromise, since the designers didn't want to make the 
"Start Over" link obvious, we went with a short session. This is for a 
little search widget that most users would only interact with for 60 
seconds or so. (Or we could be wrong about this, in which case we will need 
to extend the session length). 

Thanks for the tips I am implementing them now. 

>  (route/resources "/")

What is your hunch about this? The placement? 



On Wednesday, February 6, 2013 4:37:09 PM UTC-5, James Reeves wrote:
>
> Could you try replacing the wrap-resource middleware with the 
> route/resources function? The latter operates in a slightly different way 
> to the Ring middleware, and if the Compojure route works without issue, I 
> might have an idea what the problem is.
>
> i.e. your code should look like:
>
> (defroutes app-routes
>   (ANY "/" request (index request))
>   ;; <rest of routes>
>   (GET "/finish-user-sign-up" request (finish-user-sign-up request))
>   (route/resources "/")
>   (route/not-found "Page not found"))
>
> You've also got a max-age of 90 for your session cookies, which would mean 
> your sessions will time out in 90 seconds. Is that what you want?
>
> Also:
>
>    (GET "/foo" request (foo request))
>
> Is equivalent to:
>
>    (GET "/foo" [] foo)
>
> - James
>
>
>  On 6 February 2013 15:10, larry google groups 
> <lawrenc...@gmail.com<javascript:>
> > wrote:
>
>>
>> I created a web app using Ring, Jetty, Enlive, Compojure. 
>>
>> At the end, I bundled everything together by running the command "lein 
>> uberjar". The resulting file was 21 megs. 
>>
>> I scp the file to the server, then I ssh to the server. I start a 
>> "screen" session. Inside the screen session I type :
>>
>> java -jar kiosk-0.1-standalone.jar 30001
>>  
>> The number at the end is the port that I have it running on. 
>>
>> Sometimes, when people look at the app, none of the CSS files load. I 
>> have run into this bug myself. Sometimes, when I look at the app, the 
>> Javascript and CSS paths are broken. If I click "view source" and see the 
>> source, and if I try to follow the links to the CSS or Javascript, then I 
>> get 404 errors. 
>>
>> I have this in my code: 
>>
>>       (wrap-resource "public")
>>
>> The structure of the code is: 
>>
>> /resources
>>     /public
>>         /css
>>         /javascript
>>     /templates
>> /src
>>     /kiosk
>>
>> The code is still able to find the templates in resources/templates, and 
>> that HTML is given to Enlive, so something appears on screen. It's just the 
>> stuff in "public" that sometimes goes missing. 
>>
>> Can anyone suggest why? My routes are defined like this:
>>
>>
>> (defroutes app-routes
>>   (ANY "/" request (index request))
>>   (GET "/search-results" request (search-results request))
>>   (GET "/schema" [] (schema))
>>   (GET "/account" request (account request))
>>   (GET "/login" request (login request))
>>   (GET "/start-over" request (start-over request))
>>   (GET "/admin" request (admin request))
>>   (GET "/ok" request (ok request))
>>   (POST "/admin" request (record-new-question-if-any request))
>>   (GET "/delete-question/:question-to-delete" request (delete-question 
>> request))
>>   (GET "/finish-user-sign-up" request (finish-user-sign-up request))
>>   (route/not-found "Page not found"))
>>
>> (def app
>>   (-> app-routes
>>       (wrap-resource "public")
>>       (wrap-session {:cookie-name "discovery-session" :cookie-attrs 
>> {:max-age 90 }})
>>       (wrap-cookies)
>>       (wrap-keyword-params)
>>       (wrap-nested-params)
>>       (wrap-params)))
>>
>>
>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to