newLisp as localhost - html logbook

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

newLisp as localhost - html logbook

Post by didi »

Is it possible to use newLisp as localhost in windows and a webbrowser eg. explorer AND store data via the browser and newLisp into a file ?

I like to program a logbook-function with the webbrowser as a user-interface. The data which is typed in a textfield should be appended as clear-text to a textfile - and displayed back to the html-page.

I'm no expert, maybe it's possible with this 200k-small newLisp.

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

Yes. See here: http://www.newlisp.org/downloads/newlis ... pip_server. newLISP comes with its own built-in web server. You can save data easily with the 'save function.
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

I started one newlisp with

Code: Select all

 newlisp -d 4711
Then another newlisp where i typed :

Code: Select all

 ( net-eval "localhost" 4711 { ( save "save.lsp") } )
It worked fine and saved the context and i think in the same way i can append every text to a file - the normal newLisp commands are working - and i think my own programfunctions , too, which i load while starting the localhost.

Thanks Jeff !

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

GET and PUT requests not with windows ?

Post by didi »

With newLISP as a localhost and windows it is not possible to respond to a GET and PUT request - this is mentioned in the codepatterns.html - nevertheless i tried it and it seems that it really doesn't work ;-)

I tried a workaround - i can filter the html-request , recognize the GET command .. and do everything eq. loading a file in a string and send it .. but how the heck can i send back my html-file as a answer to the request ?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

If somewhere is written that server mode does not answer HTTP requests on Windows, than that is long obsolete.

newLISP server mode does answer HTTP reqests on Windows. But do not use IE explorer which gives problems on some versions with PUT requests. With Firefox everything works fine.

See the packages newlisp-ide-x.x.tgz and newlisp-wiki-x.x.tgz in the download area. There you can learn how to send HTML pages from a cgi process.

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

Testing the server HTTP mode using a web browser
A newLISP server also understands simple HTTP GET and PUT requests (currently UNIX only). Enter the full path of a file in the address-bar of the browser: ..
This is a quote out of the actual Code Patterns text.
I've tried it with the ie6.0 , maybe that was the reason why it didn't worked .


Thanks for your answer :-)

unixtechie
Posts: 65
Joined: Sat Sep 06, 2008 6:30 am

Post by unixtechie »

...

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

hi unixtechie,

i want newLISP as a loacalserver to build a logbook for eg. a project-change-tracking with some colleagues on my day-job .
In our company we must use microsoft-windows and it's internet-explorer and it's a bigger act to get java on your pc - no way for an apache-server ...

So the idea is to use the small newLISP-localhost and the browser as the user-interface .
I think the ide ( or wiki) example has already everything you need .

Locked