Open cl-03 opened 4 years ago
Hi,
This project is has been on maintenance mode for years and is no longer being developed actively.
There is a directory with examples.
Here is an example of how to start a server:
CL-USER 1 > (in-package :s-http-server)
#<The S-HTTP-SERVER package, 90/128 internal, 31/64 external>
S-HTTP-SERVER 2 > (defvar *server* (make-s-http-server))
*SERVER*
S-HTTP-SERVER 3 > (start-server *server*)
;; S-HTTP-SERVER: Started a new server on port 1701
#<S-HTTP-SERVER "s-http-server" port 1701 running 10C5F6EB>
S-HTTP-SERVER 4 > (register-context-handler *server* "/my-site" 'static-resource-handler :arguments '("/var/www/"))
((STATIC-RESOURCE-HANDLER "/my-site" "/var/www/") (S-HTTP-SERVER-HANDLER "/s-http-server" :BUILTIN))
S-HTTP-SERVER 5 > (stop-server *server*)
;; S-HTTP-SERVER: Stopped server
#<S-HTTP-SERVER "s-http-server" port 1701 not running 10C5F6EB>
HTH,
Sven
I made the following document more readable:
You're so kind!Thank you very much!I'll have a try later, and devote myself to grasp it.Thank you again
I had tried,and it seems that it only works on Lispworks well(on sbcl there comes an error can't find serve page),and don't know whether it depends on Operating System or not (it seems work on MAC)
Yes, that is correct, KPAX was written for LispWorks. It used to run on Allegro CL and SBCL, but that was a very long time ago.
sorry to ask an idiot question:when the package ,kpax kpax-examples kpax-core kpax-mod-lisp kpax-s-http-serve kpax-pasever loded.And the server defined also started,how to start or visit the webapps such as helloworld1,factorial1 and so on.As I Typed "localhost:1701"or"localhost:1701/helloworld1",only realized that the server works,but can't see the pages what I want. thanks for yor generosity
Isn't the default port 2001 ?
You can inspect the *server* variable to figure out the actual port used.
If it is really 1701, then try
It still doesn't work and signed “Resource Not Found 404 - Resource Not Found: "/kpax/dynamic/helloworld1"。 And I also try to change the value of port ,It seems locked. S-HTTP-SERVER 28 > server
S-HTTP-SERVER 29 > (defvar server nil) SERVER
S-HTTP-SERVER 30 > server
By the way,the edition I used was 《LispWorks Personal 6.1》
Are you sure you started (loaded) the examples themselves ?
I just (ql:quickload :kpax-examples) before start server.Didn't load exaple one by one
Maybe the lispworks too old to didn't include asdf-version >=3.1 that couldn't load the depends-package "kpax-paserve" I guess
no, that is OK, I have the same old lispworks. pa-serve is not needed and should not be loaded.
if you get output in the listener, even an 404 errror, that means the server works. Try restarting it.
There are messages in the listener: S-HTTP-SERVER 58 > (kpax:start-kpax) ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :CALCULATOR 225F6233> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/calculator/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :LIST-WEB-APPS 22638DE7> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/list-web-apps/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :UPLOAD2 2262485B> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/upload2/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :NO-SESSION1 226042BB> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/no-session1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :HELLOWORLD1 2262C287> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/helloworld1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :PI 2265C443> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/pi/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :UPLOAD3 226222D3> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/upload3/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :WELCOME 2267CB5B> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/welcome/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :BENCHMARK1 226208E3> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/benchmark1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :LSP 22679EBF> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/lsp/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :KIWI 226743EF> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/kiwi/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :FORMS1 22608337> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/forms1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :SECURE1 22626F8F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/secure1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :FACTORIAL1 2071C4FB> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/factorial1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :FORMS2 2261D75F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/forms2/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :SECURE-LOGIN 22639B0F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/secure-login/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :SNOOP1 2071CC5B> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/snoop1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :MENU1 2265D71B> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/menu1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :BROWSER1 225F693F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/browser1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :SESSION1 226072AF> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/session1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :REDDIT 226793DB> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/reddit/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :TABS1 2265AF07> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/tabs1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :TODO-LIST 2262165F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/todo-list/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :UPLOAD1 22627F77> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/upload1/ ;; KPAX 20191227T005118 INFO Started #<KPAX:WEB-APP :WIKI 2267420F> ;; KPAX 20191227T005118 INFO http://localhost:1701/kpax/dynamic/wiki/ ;; KPAX 20191227T005118 INFO Server running
But,when I typed the url:http://localhost:1701/kpax/dynamic/helloworld1/ there still Resource Not Found 404 - Resource Not Found: "/kpax/dynamic/helloworld1
Did you try port 2001 ?
This is what I did:
CL-USER 1 > (asdf :kpax-examples)
;; Executing (ASDF:OPERATE 'ASDF:LOAD-OP :KPAX-EXAMPLES)
; loading system definition from /Users/sven/develop/lisp/asdf/systems/kpax-examples.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/KPAX/kpax-examples.asd
; registering #<SYSTEM :KPAX-EXAMPLES 200B9BFB> as KPAX-EXAMPLES
; loading system definition from /Users/sven/develop/lisp/asdf/systems/s-http-client.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/s-http-client/s-http-client.asd
; registering #<SYSTEM :S-HTTP-CLIENT 21A43B6F> as S-HTTP-CLIENT
; loading system definition from /Users/sven/develop/lisp/asdf/systems/chipz.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/chipz/chipz.asd
; registering #<SYSTEM :CHIPZ 20109253> as CHIPZ
; loading system definition from /Users/sven/develop/lisp/asdf/systems/puri.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/com.b9.puri.ppcre/puri.asd
; registering #<SYSTEM PURI 21A3B313> as PURI
; registering #<SYSTEM PURI-TESTS 200AD013> as PURI-TESTS
; loading system definition from /Users/sven/develop/lisp/asdf/systems/s-base64.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/s-base64/s-base64.asd
; registering #<SYSTEM :S-BASE64 21A4DF2B> as S-BASE64
; loading system definition from /Users/sven/develop/lisp/asdf/systems/s-sysdeps.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/s-sysdeps/s-sysdeps.asd
; registering #<SYSTEM :S-SYSDEPS 2010BF2F> as S-SYSDEPS
; loading system definition from /Users/sven/develop/lisp/asdf/systems/s-utils.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/s-utils/s-utils.asd
; registering #<SYSTEM :S-UTILS 200BD54B> as S-UTILS
; loading system definition from /Users/sven/develop/lisp/asdf/systems/kpax.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/KPAX/kpax.asd
; registering #<SYSTEM :KPAX 200BB26F> as KPAX
; loading system definition from /Users/sven/develop/lisp/asdf/systems/kpax-s-http-server.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/KPAX/kpax-s-http-server.asd
; registering #<SYSTEM :KPAX-S-HTTP-SERVER 200C2207> as KPAX-S-HTTP-SERVER
; loading system definition from /Users/sven/develop/lisp/asdf/systems/s-http-server.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/s-http-server/s-http-server.asd
; registering #<SYSTEM :S-HTTP-SERVER 200FFC27> as S-HTTP-SERVER
; loading system definition from /Users/sven/develop/lisp/asdf/systems/salza2.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/salza2/salza2.asd
; registering #<SYSTEM #:SALZA2 200F9EE3> as SALZA2
; loading system definition from /Users/sven/develop/lisp/asdf/systems/kpax-core.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/KPAX/kpax-core.asd
; registering #<SYSTEM :KPAX-CORE 21A4687F> as KPAX-CORE
; loading system definition from /Users/sven/develop/lisp/asdf/systems/ironclad.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/ironclad/ironclad.asd
; registering #<SYSTEM :IRONCLAD 200F5867> as IRONCLAD
; registering #<SYSTEM IRONCLAD-TESTS 200B7507> as IRONCLAD-TESTS
; loading system definition from /Users/sven/develop/lisp/asdf/systems/nibbles.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/nibbles/nibbles.asd
; registering #<ASDF:SYSTEM :NIBBLES 200CCD9B> as NIBBLES
; registering #<ASDF:SYSTEM :NIBBLES-TESTS 20105907> as NIBBLES-TESTS
; loading system definition from /Users/sven/develop/lisp/asdf/systems/cl-who.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/cl-who/cl-who.asd
; registering #<SYSTEM :CL-WHO 200F8C47> as CL-WHO
; registering #<SYSTEM :CL-WHO-TEST 200E88CF> as CL-WHO-TEST
; loading system definition from /Users/sven/develop/lisp/asdf/systems/kpax-mod-lisp.asd into
; #<The ASDF0 package, 0/16 internal, 0/16 external>
; Loading text file /Users/sven/Develop/git/KPAX/kpax-mod-lisp.asd
; registering #<SYSTEM :KPAX-MOD-LISP 200C4D8B> as KPAX-MOD-LISP
; Loading fasl file /Users/sven/Develop/git/chipz/package.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/constants.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/types-and-tables.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/crc32.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/adler32.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/conditions.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/dstate.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/inflate-state.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/gzip.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/zlib.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/inflate.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/bzip2.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/decompress.xfasl
; Loading fasl file /Users/sven/Develop/git/chipz/stream.xfasl
; Loading fasl file /Users/sven/Develop/git/com.b9.puri.ppcre/src.xfasl
; Loading fasl file /Users/sven/Develop/git/s-base64/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/s-base64/src/base64.xfasl
; Loading fasl file /Users/sven/Develop/git/s-sysdeps/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/s-sysdeps/src/sysdeps.xfasl
; Loading /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/comm-defsys.lisp on demand...
;; Creating system "COMM"
; Loading text file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/comm-pkg.lisp
; Loading fasl file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/sockets.xfasl
; Loading fasl file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/ssl-constants.xfasl
; Loading fasl file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/ssl-foreign-types.xfasl
; Loading fasl file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/ssl.xfasl
; Loading fasl file /Applications/LispWorks 6.0/Library/lib/6-0-0-0/load-on-demand/processes/ssl-certs.xfasl
; Loading fasl file /Users/sven/Develop/git/s-utils/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/s-utils/src/utils.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-client/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-client/src/http-client.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/package.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/reset.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/specials.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/types.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/checksum.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/adler32.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/crc32.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/chains.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/bitstream.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/matches.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/compress.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/huffman.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/closures.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/utilities.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/compressor.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/zlib.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/gzip.xfasl
; Loading fasl file /Users/sven/Develop/git/salza2/user.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/globals.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/http-server.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/https-server.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/handlers.xfasl
; Loading fasl file /Users/sven/Develop/git/s-http-server/src/tools.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/package.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/types.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/macro-utils.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/vectors.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/streams.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/sbcl-opt/fndb.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/sbcl-opt/nib-tran.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/sbcl-opt/x86-vm.xfasl
; Loading fasl file /Users/sven/Develop/git/nibbles/sbcl-opt/x86-64-vm.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/package.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/conditions.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/util.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/macro-utils.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/common.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/octet-stream.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/padding.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/kdf-common.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/pkcs5.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/scrypt.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/password-hash.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/public-key/public-key.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/public-key/dsa.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/public-key/rsa.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/cipher.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/modes.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/make-cipher.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/null-cipher.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/aes.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/des.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/blowfish.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/twofish.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/idea.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/misty1.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/square.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/rc2.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/rc5.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/rc6.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/tea.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/xtea.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/cast5.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/ciphers/arcfour.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/sbcl-opt/fndb.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/sbcl-opt/x86oid-vm.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/digest.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/crc24.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/crc32.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/adler32.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/md2.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/md4.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/md5.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/md5-lispworks-int32.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/sha1.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/sha256.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/sha512.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/ripemd-128.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/ripemd-160.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/tiger.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/whirlpool.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/digests/tree-hash.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/prng/prng.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/prng/generator.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/prng/fortuna.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/math.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/macs/hmac.xfasl
; Loading fasl file /Users/sven/Develop/git/ironclad/src/macs/cmac.xfasl
; Loading fasl file /Users/sven/Develop/git/cl-who/packages.xfasl
; Loading fasl file /Users/sven/Develop/git/cl-who/specials.xfasl
; Loading fasl file /Users/sven/Develop/git/cl-who/util.xfasl
; Loading fasl file /Users/sven/Develop/git/cl-who/who.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/package-kpax.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/log.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/util.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/localization.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/mersenne-twister-random.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/crypto.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/html-macro.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/html.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/globals.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/constants.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/attributes-mixin.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/session.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/server.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/request-response.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/translator.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/web-app-in-server.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/session-tracking.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/web-app.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/dispatcher.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/debug.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/kpax.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/run.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/multipart-form-encoding.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/extensions.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/options.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/constraints.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/menubar.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/data-set-view.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/web-form.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/package-kpax-user.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/s-http-server.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/s-https-server.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/src/mod-lisp.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/helloworld1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/factorial1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/session1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/no-session1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/snoop1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/forms1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/forms2.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/benchmark1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/todo-list.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/secure1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/upload1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/upload2.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/upload3.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/calculator.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/list-web-apps.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/menu1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/tabs1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/browser1.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/secure-login.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/pi.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/lsp.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/wiki.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/reddit.xfasl
; Loading fasl file /Users/sven/Develop/git/KPAX/example/welcome.xfasl
#<ASDF:LOAD-OP NIL 21779323>
CL-USER 2 > (in-package :kpax)
#<The KPAX package, 520/1024 internal, 197/256 external>
KPAX 3 > (start-kpax)
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :NO-SESSION1 219CE9B7>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :NO-SESSION1 219CE9B7>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/no-session1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :BENCHMARK1 219F934B>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :BENCHMARK1 219F934B>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/benchmark1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :SECURE1 219D1D43>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :SECURE1 219D1D43>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/secure1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :FORMS1 219495B3>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :FORMS1 219495B3>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/forms1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :FORMS2 219D5683>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :FORMS2 219D5683>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/forms2/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :PI 220C3CD7>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :PI 220C3CD7>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/pi/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :WELCOME 220EB583>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :WELCOME 220EB583>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/welcome/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :MENU1 219D04E3>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :MENU1 219D04E3>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/menu1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :KIWI 200E9863>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :KIWI 200E9863>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/kiwi/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :LSP 2209D56F>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :LSP 2209D56F>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/lsp/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :HELLOWORLD1 2196607B>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :HELLOWORLD1 2196607B>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/helloworld1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :BROWSER1 21A112CF>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :BROWSER1 21A112CF>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/browser1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :SNOOP1 2194AEC7>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :SNOOP1 2194AEC7>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/snoop1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :TABS1 219F5AC7>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :TABS1 219F5AC7>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/tabs1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :TODO-LIST 21A12B93>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :TODO-LIST 21A12B93>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/todo-list/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :SESSION1 219A972F>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :SESSION1 219A972F>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/session1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :SECURE-LOGIN 200FCDC7>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :SECURE-LOGIN 200FCDC7>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/secure-login/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :UPLOAD1 219F9FAB>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :UPLOAD1 219F9FAB>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/upload1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :FACTORIAL1 219A0927>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :FACTORIAL1 219A0927>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/factorial1/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :CALCULATOR 219F026B>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :CALCULATOR 219F026B>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/calculator/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :REDDIT 221303C3>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :REDDIT 221303C3>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/reddit/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :LIST-WEB-APPS 21A0DEBF>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :LIST-WEB-APPS 21A0DEBF>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/list-web-apps/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :WIKI 200E9C63>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :WIKI 200E9C63>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/wiki/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :UPLOAD2 219F6EAB>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :UPLOAD2 219F6EAB>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/upload2/
;; KPAX 20191227T162904 INFO Stopped #<WEB-APP :UPLOAD3 219CC6AF>
;; KPAX 20191227T162904 INFO Started #<WEB-APP :UPLOAD3 219CC6AF>
;; KPAX 20191227T162904 INFO http://localhost:1701/kpax/dynamic/upload3/
;; KPAX 20191227T162904 INFO Server running
#<S-HTTP-SERVER "anonymous" :RUNNING 200B40F7>
KPAX 4 > (s-http-client:do-http-request "http://localhost:1701/kpax/dynamic/helloworld1")
Error: Cannot establish http client endpoint "http://localhost:1701/kpax/dynamic/helloworld1"
1 (abort) Return to level 0.
2 Return to top loop level 0.
Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.
KPAX 5 : 1 > :a
KPAX 6 > (s-http-client:do-http-request "http://localhost:2001/kpax/dynamic/helloworld1")
;; KPAX 20191227T163012 DEBUG handling /kpax/dynamic/helloworld1
;; KPAX 20191227T163012 DEBUG created new session 2EU3K4CY6N6ZP [11429512727350071589]
;; KPAX 20191227T163012 DEBUG replied 553 bytes with status OK
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html><head><title>HelloWorld1!</title><link rel='stylesheet' type='text/css' href='/kpax/static/nx.css' /></head><body><h1>HelloWorld1!</h1><div class='NX_panel'><span class='NX_title'>KPAX</span><div class='NX_border'><p>Good afternoon!</p><p>HelloWorld from KPAX running on LispWorks 6.0.1</p><img width='359' height='510' alt='KPAX Movie Poster' src='/kpax/static/helloworld1/kpax-movie-poster.jpg' /></div></div></body></html>"
200
((:CONTENT-TYPE . "text/html") (:CONTENT-LENGTH . "553") (:SET-COOKIE . "session-id=KPAX1.2EU3K4CY6N6ZP; path=/kpax/dynamic/helloworld1") (:DATE . "Fri, 27 Dec 2019 16:30:12 GMT") (:SERVER . "KPAX/S-HTTP-SERVER LispWorks 6.0.1"))
#<PURI:URI http://localhost:2001/kpax/dynamic/helloworld1>
:NEW
KPAX 7 >
I know this confusing as it prints out URLs with port 1701, some kind of bug for sure. But the server inside is really using 2001.
KPAX 21 > (first *web-app-servers*)
#<S-HTTP-SERVER "anonymous" :RUNNING 216122C3>
KPAX 22 > (describe *)
#<S-HTTP-SERVER "anonymous" :RUNNING 216122C3> is a S-HTTP-SERVER
S-HTTP-SERVER #<S-HTTP-SERVER:S-HTTP-SERVER "s-http-server" port 2001 running 2163BCEF>
NAME "anonymous"
DYNAMIC-PREFIX "/kpax/dynamic/"
STATIC-PREFIX "/kpax/static/"
HOSTNAME "localhost"
WEB-APPS :ALL
SERVER-ID "KPAX1"
DISPATCHER #<DISPATCHER 21612827>
DEBUG-MODE T
STREAM-APPENDER #<STREAM-APPENDER 21611DEB>
DEBUG-STREAM-APPENDER #<DEBUG-STREAM-APPENDER 21611E5B>
STATE :RUNNING
SESSIONS #<EQL Hash Table{1} 2161277F>
SESSION-LIFETIME 3600
SESSIONS-LAST-REAPED 3786453012
SESSION-ID-SEED 2661140804
SESSION-LOCK #<MP:LOCK "session-manager" Unlocked 216127E7>
ATTRIBUTES NIL
CUTOFF -536870912
LOGGER-LOCK #<MP:LOCK "logger" Unlocked 216122CF> ........
HTH, you will have to use the source code to find out more.
That works!Thank you very much,and I was stopped at the last step.NEXT,I will deeply devoted into your code and learn from It!Thank you again
That works!Thank you very much,and I was stopped at the last step.NEXT,I will deeply devoted into your code and learn from It!Thank you again
Hi,
I just added a directory 'static' with missing resources needed for the examples.
You can set up static hosting as follows:
(s-http-server:register-context-handler
(get-s-http-server (first *web-app-servers*))
"/kpax/static"
's-http-server:static-resource-handler
:arguments (list "/Users/sven/Develop/git/KPAX/example/static/"))
Of course you will have to change the last directory name.
With this change properly configured, you will see much better pages, try
My dear senior,could you tell me where I can find the details about differences between difference implements of Common Lisp,such as,lispworks,sbcl,cmu,etc.That I can get the knowledge and guide myself to progame portable codes.Does it exist?like website,books,blogs,and treatises as well
I have been out of the CL community for much too long, I guess starting points would be
CL portability is actually quite good. The main problem is that networking and multiprocessing are not part of the standard, but there exist solutions. In my old code I used my own package called S-SYSDEPS.
Good luck, there is much to learn, but you will become a much better programmer.
Thank you for your encouragement and patient guidance,I'll learn it step by step conscientiously
I think I just come the first level:Understand the basic characteristics and featues,master basic usage and application of CL.What should I do next is to learn more libraries for CL and use it frequently。Learning your codes are very meaningful,what's more ,your great instructions are very precious,grateful for your work
the Packages include :s-sysdeps and :s-http all works well at the implement called sbcl ,so there may be something behind the package :kpax make it couldn't work on sbcl,I 'll try to fix it
DEAR PH, The book 《Using Common Lisp to build Web Applications》,though I have reading it,I couldn't use your project “KPAX" correctly。Even though there are many examples in your project,I don't know which is the first step。I don't know how to start,As there didn't exist IP address or Ports defined in the code,I'm a newbee on common LISP,forgive me for my ignorance, yours sincerely lisper03