trouble getting demos to render

7 views
Skip to first unread message

Kyle Foreman

unread,
Aug 3, 2010, 2:37:12 AM8/3/10
to luban-users
When testing out the demos, I can get them served up remotely but they
don't seem to render anything. For instance, this should be the
aokuang demo: http://moby.ihme.washington.edu:2303/cgi-bin/main.py

The source is all there, but it's rendered as a blank page. When I
compare view-source:http://luban.danse.us/cgi-bin/aokuang/main.cgi to
view-source:http://moby.ihme.washington.edu:2303/cgi-bin/main.py here
are the only differences I see:

1) Mine lacks <script src="javascripts/jquery/excanvas.min.js"></
script>
2) The luban controller url is different (using main.py instead of
main.cgi)
3) Mine lacks
luban.widgets.implementationRegistry.application, .codeeditor,
and .base
4) Mine has a different baseref (obviously)
5) Mine is missing <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">

Any thoughts? Neither Chrome nor IE (nor w3m) show anything.... but no
errors either.

Thanks!
Kyle

linjiao

unread,
Aug 3, 2010, 7:54:21 AM8/3/10
to luban-users
Hi Kyle,

The dev site served by SimpleHttpServer by default only is viewable at
your localhost and is not working for users browsing from the outside
world. So if you have a browser inside your moby.ihme.washington.edu
machine, you should be able to use your browser to point to
http://localhost:2303/cgi-bin/main.py and see the site live. I would
not recommend to make http://moby.ihme.washington.edu:2303/cgi-bin/main.py
available. If you just want to give it a try, however, you can edit
file "config/web-weaver.pml" and change the property "html-base" to
http://moby.ihme.washington.edu:2303/, and it should work.

I would recommend to use apache to serve your application to the
outside world. You will need a cgi script similar to
http://luban.danse.us/cgi-bin/aokuang/main.cgi, and you will need to
modify web-weaver.pml to use that cgi script. Suppose you have your
cgi script hosted by apache at http://moby.ihme.washington.edu/cgi-bin/demo1/main.cgi,
and the static html base (for css and javascripts) is at
http://moby.ihme.washington.edu/demo1 (so that
http://moby.ihme.washington.edu/demo1/javascripts/luban/luban-core.js
exists), the web-weaver.pml file should look like

<inventory>
<component name="web-weaver">
<property name="controller-url">/cgi-bin/demo1/main.cgi</property>
<property name="html-base">/demo1/</property>
</component>
</inventory>

Let me know if you have trouble setting up the cgi script, the main
thing to check there is the path of the python script.

I normally only uses SimpleHttpServer in the development cycle and do
not serve the site using apache until it is time for deploying the
site at a machine. For deployment, the main things to do are

* write a minimal cgi script and make sure it is served
* make sure the static html files are served
* modify web-weaver.pml as explained above

The differences you mentioned in your email are mostly due to recent
minor changes to luban to make it support IE7 and IE8.

Let me know if there is anything unclear, and thanks!

--Jiao

Kyle Foreman

unread,
Aug 4, 2010, 3:31:18 AM8/4/10
to luban-users
Thanks Jiao!

Since I'm working from Sri Lanka for the summer with just a netbook, I
currently have a weird setup in which I only have ssh access to my
server (which itself is a VM on the Moby machine..... what a mess!).

I'll try editing the pml file and see how it works before
contemplating Apache. I remember Apache being a pain to get running,
but that was 2003 so hopefully it's become friendlier (or I've gotten
better) in the meantime!

Kyle

On Aug 3, 4:54 am, linjiao <jiao....@gmail.com> wrote:
> Hi Kyle,
>
> The dev site served by SimpleHttpServer by default only is viewable at
> your localhost and is not working for users browsing from the outside
> world. So if you have a browser inside your moby.ihme.washington.edu
> machine, you should be able to use your browser to point tohttp://localhost:2303/cgi-bin/main.pyand see the site live. I would
> not recommend to makehttp://moby.ihme.washington.edu:2303/cgi-bin/main.py
> available. If you just want to give it a try, however, you can edit
> file "config/web-weaver.pml" and change the property "html-base" tohttp://moby.ihme.washington.edu:2303/, and it should work.
>
> I would recommend to use apache to serve your application to the
> outside world. You will need a cgi script similar tohttp://luban.danse.us/cgi-bin/aokuang/main.cgi, and you will need to
> modify web-weaver.pml to use that cgi script. Suppose you have your
> cgi script hosted by apache athttp://moby.ihme.washington.edu/cgi-bin/demo1/main.cgi,
> and the static html base (for css and javascripts) is athttp://moby.ihme.washington.edu/demo1(so thathttp://moby.ihme.washington.edu/demo1/javascripts/luban/luban-core.js
Reply all
Reply to author
Forward
0 new messages