quality@glassfish.java.net

problem with jmaki.accordionMenu widget and WEBrick

From: Wim Verreycken <wim_at_pizzastop.be>
Date: Mon, 29 Dec 2008 19:51:32 +0100

Hi everyone,


I have a problem with the jmaki accordionMenu and WEBrick(Netbeans Built-in
JRuby 1.1.4).

When use the accordionMenu like this :
        <a:widget name="jmaki.accordionMenu"
service="http://localhost:3000/menus/menufile/1.json"/>
The menu stays empty! (1.json generated by JRuby ERB template).

Then when I go to http://localhost:3000/menus/menufile/1.json, save the json
file with the browser, and I copy it to the jmaki webproject in netbeans,
under "Web Pages", the result is
http://localhost:9082/Z4LunchlinkWeb2/1.json

Then when I change the jmaki accordionmenu to use this url like this:
        <a:widget name="jmaki.accordionMenu"
service="http://localhost:9082/Z4LunchlinkWeb2/1.json"/>
the menu appears fine. (!?!!!!)

I used TCPMon to see if there where any differences in the responses from
Glassfish and WEBrick.
There's only a small difference in the headers :
HTTP/1.1 200 OK
X-Powered-By: Servlet/2.5
Server: GlassFish/v3
ETag: W/"818-1230567786265"
Last-Modified: Mon, 29 Dec 2008 16:23:06 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 818
Date: Mon, 29 Dec 2008 18:09:01 GMT

HTTP/1.1 200 OK
Cache-Control:
Connection: Keep-Alive
Date: Mon, 29 Dec 2008 18:09:16 GMT
Content-Type: text/html; charset=iso-8859-1
Etag: "6900bb3142390f0610fff9df909c6141"
Server: WEBrick/1.3.1 (Ruby/1.8.6/2007-09-24)
X-Runtime: 0.07800
Content-Length: 818

These are the only differences.
You don't even see this in a browser. In Firefox the json file on both url's
looks EXACTLY the same. But the jmaki AccordionMenu only accepts the json
file served by Glassfish, not the one generated by JRuby! :(

Does anyone know why? Can anyone help me please?
Or where do I go with problems relating to jmaki.accordionMenu ?

Thanks and Best wishes for the New Year to everyone!


Wim