Jetty (partially) uses out-of-date code

70 views
Skip to first unread message

Tobias Pfeiffer

unread,
Apr 29, 2012, 8:10:45 AM4/29/12
to lif...@googlegroups.com
Hi,

I am experiencing some very weird issues with my Lift application: When
I develop locally, everything works as intended, then I package the files
with mvn war:war and deploy them to my Jetty server, then it seems as if
for *some* files, Jetty still uses the old version.
That is, templates, snippets etc. are looking fine, but a class doing
some periodic background jobs is not doing the same as on my dev
machine, but still shows the same behaviour as a couple of days ago. And
this even happens after I cleared the whole target/ folder in my build
tree and rebuilt completely.

Has anyone of you experienced something similar and might tell me what I
should double-check or where this might come from? Does Jetty cache some
classes somewhere etc.?

Thanks for your help
Tobias

Olek Swirski

unread,
Apr 29, 2012, 8:20:27 AM4/29/12
to lif...@googlegroups.com
try doing
touch jetty-dir/contexts/your_app.xml
otherwise placing war may not force jetty to use
it, and it will read previously extracted war
- it extracts it to some tmp dir or you may also
specify that dir in jetty config files

similarly, take note, that when running in production
mode, jetty won't show new templates until
you reload war (I guess templates are cached for
efficiency)

Olek Swirski

unread,
Apr 29, 2012, 8:40:12 AM4/29/12
to lif...@googlegroups.com
you may also try change/adjust these settings in
jetty-dir/contexts/your_app.xml

<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="tempDirectory">/tmp/for/my_app/dir</Set>

I'm not sure what copyWebDir exactly does,
but it definitely does something related to
copying web dir :)


On 29/04/12 14:10, Tobias Pfeiffer wrote:
Reply all
Reply to author
Forward
0 new messages