Page 1 of 1

newLISP as a localhost and CGI-processing

Posted: Wed Jan 21, 2009 5:58 pm
by didi
The exact code sample of the cgi.lsp file can't be shown here, but it starts with :
<% (set 'site "example.com") %>
...
I put this code in a sample html-file and called the file via newLISP as a localhost but nothing happens , only the normal page is shown. The ide-app works via the same localhost .

The idea is to make a simple application without frames and javascript, but i can't derive this out of the ide- or wiki-example. Must i first start the cgi.lsp in the html-file and how ? - any other ideas ?

Posted: Wed Jan 21, 2009 7:20 pm
by Lutz
To make he <% and %> tags work the page has to be put through the function CGI:put-page in cgi.lsp. Include modules/cgi.lsp in you cgi file then output the HTML page containing the tags using this function.

Posted: Wed Jan 21, 2009 7:22 pm
by cormullion
Not enough info to help, really, sorry. My limited experience of newLISP CGI is to run a simple file using newLISP as the web server. I've written a bit about it here, but this doesn't seem to overlap with your syntax example at all... :(

edit: ah Lutz is two minutes ahead of me with the right answer :)

Posted: Thu Jan 22, 2009 5:58 am
by didi
Both hints helped me really . Many thanks to you ! Besides the powerful small newLISP , your immediate help here ( to even the beginners questions ) is really super !!