Google Groups

Re: Javascript and CSS files results in 404 Not Found, after one week


KajMagnus Jan 17, 2012 5:02 PM
Posted in group: Lift
Hi David

On Jan 18, 1:30 am, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> What kind of container are you using?

Jetty

> If it's Jetty, there's a wacky thing that Jetty does... it unpacks WAR
> files into the /tmp directory and if you've got a cron job that cleans up
> files in the /tmp directory, those files may be getting cleaned out.

`crontab -l' lists no jobs -- but I'll remember to check whether or
not
the files are present in /tmp/ the next time the problem happens.
(Perhaps they get deleted for some other reason)

> Also, why are you serving them via /classpath?  Why not just make them
> static files in the WAR?

The files reside in a `core' module that is supposed to be fairly
framework
independent.  I include it in my `app-liftweb' project, hence the /
classpath/
path.  (The main WAR project, `app-liftweb', is actually an almost
empty SBT
project that only provides a tiny Boot class, and includes various
other
modules)

Thanks for your help

Best regards, KajMagnus


> On Tue, Jan 17, 2012 at 4:24 PM, KajMagnus <kajmagnu...@gmail.com> wrote:
> > Hi
>
> > I have a server up and running, and always after 1 or 2 weeks uptime,
> > LiftWeb says:
> > "The Requested URL /classpath/0/js/debiki.js was not found on this
> > server"
> > for requests for Javascript and CSS files.
>
> > The first 1 or 2 weeks the server functions fine, and it starts to
> > work again (that is, find .js and .css files) after restart.
>
> > Do you know what could the problem be? Or how I can troubleshoot it?
> > (I've found nothing unusual in the log files, except for status code
> > 404 Not Found not 200 OK suddenly being returned.)
>
> > (Since the server works fine the first 1 or 2 weeks, and since I think
> > that requests for .js and .css is not handled by my own code, it feels
> > to me that this is something happening inside Lift-Web.
> > Requests for html pages always continue to work as intended, returns
> > status 200 OK and html.
> > Even when all requests like:  http://server/classpath/file.js
> > and ..../file.css   results in status 404 (Not
> > Found).)
>
> > Best regards, KajMagnus
>
> > --
> > Lift, the simply functional web framework:http://liftweb.net
> > Code:http://github.com/lift
> > Discussion:http://groups.google.com/group/liftweb
> > Stuck? Help us help you:
> >https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --
> Visi.Pro, Cloud Computing for the Rest of Ushttp://visi.pro
> Lift, the simply functional web frameworkhttp://liftweb.net
> Follow me:http://twitter.com/dpp
> Blog:http://goodstuff.im