newLISP Fan Club

Forum => newLISP in the real world => Topic started by: didi on January 21, 2009, 09:58:21 AM

Title: newLISP as a localhost and CGI-processing
Post by: didi on January 21, 2009, 09:58:21 AM
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 ?
Title:
Post by: Lutz on January 21, 2009, 11:20:36 AM
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.
Title:
Post by: cormullion on January 21, 2009, 11:22:11 AM
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 (//http), 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 :)
Title:
Post by: didi on January 21, 2009, 09:58:22 PM
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 !!