forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Gardler" <rgard...@apache.org>
Subject Re: [apache-forrest-0.8] problem with java script file location
Date Wed, 25 Apr 2007 13:18:34 GMT
On 25/04/07, Paul.Divine@alcatel-lucent.fr
<Paul.Divine@alcatel-lucent.fr> wrote:
> I try to access a html file with th address
>
> http://mysite/nobelists.htm
>
> A small window diplay the following message
>
> We cannot locate the data file
> http://mysite/nobelists.js
> Check that the file name is correct
>
> In the file there is the following line
>    <link href="nobelists.js" type="application/json" rel="exhibit/data" />
> and the file nobelists.js is in the same directory as nobelists.htm
>
>
> The same configuration with forrest 0.7 works well.

The handling of javascript files has not been (intentionally?) changed
in 0.8, but the handling of resources generally has changed. We now
use the locationmap to resolve resources such as JS files.

Theoretically, if you follow the upgrade instructions for 0.8 anything
that worked in 0.7 will continue to work. Of course, there may be
boundary cases where we missed something in the upgrade instructions.

So, my first question is, have you followed the upgrade instructions
[1] to the letter?

The correct location for script files is "resources/scripts", you
mention in your mail that you tried this but it does not work for you.
Do you have a project sitemap? If so is there anything in there that
may be blocking the request for your *.js files?

To debug the problem turn on debugging for the locationmap (see the
FAQ for info on logging [2]). Do "forrest run"  then request your js
file with http://localhost:8888/nobelist.js

Your locationmap log will now show what was processed in order to try
and resolve this location. There will be loads of results since this
is a first request and caching has not been initialised yet, but
towards the end you should find it looking for project.js.nobelist and
this should resolve to your resources/scripts directory.

You won't see this as it isn't working for you so we need to see why not.

The locationmap logs are hard to decipher so feel free to post
snippets here to ask how to make sense of them.

Ross

[1] http://forrest.apache.org/docs_0_80/upgrading_08.html
[2] http://forrest.apache.org/docs_0_80/faq.html#logs

Mime
View raw message