Hi, I am writing an answer to my own question as I have in the end succeeded in writing "Hello" on the web page after re-defining the init-user-session function in the weblocks-demo package (instead of in the weblock or cl-user package).
I was deceived not to get any answer on this forum and I am a bit anxious for the future. Is Weblocks already old fashioned? Is Weblocks the actual right choice to start writing dynamic websites nowdays? Are people using it and susceptible to help newbies? Irène Le samedi 13 octobre 2012 18:19:51 UTC+2, idurand a écrit : > > Hi, > > I am new to Weblocks and trying to run the demo > http://trac.common-lisp.net/cl-weblocks/wiki/UserManual#BreakingtheIce > > I have succeeded in seeing and using the weblocks-demo on > http://localhost:8080/weblocks-demo/ > > But I am stuck on the next step (changing something and seeing the result): > > > (weblocks:defwebapp our-application :prefix "/") > > (defun init-user-session (comp) > (setf (weblocks:composite-widgets comp) > (list "Hello!"))) > > Now let's tell Weblocks to reset all sessions so it picks up the new > application: > > > (weblocks:reset-sessions) > Refresh the browser. Instead of the welcome page you should > now see the word "Hello!" printed on the screen. > ---------------------------------------------------------------- > The transcript is the following: > ---------------------------------------------------------------- > CL-USER> (defun init-user-session (comp) > (setf (weblocks:composite-widgets comp) > (list "Hello!"))) > INIT-USER-SESSION > CL-USER> (weblocks:reset-sessions) > ; No value > ---------------------------------------------------------------- > When refreshing the page, I see no change but > in the REPL I get the messages below. > > I am really not understanding what I am doing. > But, I would appreciate any help that would make me move forward > my own web site. > > Thanks in advance, > Irène > > > > > [2012-10-13 18:13:07 [INFO]] No session for session identifier > '1:55838F08EC06B63F37D72B170DDD7D23' (User-Agent: 'Mozilla/5.0 (Macintosh; > Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0', IP: '127.0.0.1') > 127.0.0.1 - [2012-10-13 18:13:07] "GET /weblocks-demo/ HTTP/1.1" 302 336 "-" > "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 > Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET /weblocks-demo/ HTTP/1.1" 302 336 "-" > "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 > Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET /weblocks-demo/ HTTP/1.1" 200 2413 "-" > "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 > Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/stylesheets/layout.css HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/stylesheets/main.css HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/stylesheets/dialog.css HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/stylesheets/suggest.css HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET /weblocks-demo/pub/scripts/dialog.js > HTTP/1.1" 304 - "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 > (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/scripts/prototype.js HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET > /weblocks-demo/pub/scripts/scriptaculous.js HTTP/1.1" 304 - > "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 (Macintosh; Intel Mac OS > X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET /weblocks-demo/pub/scripts/shortcut.js > HTTP/1.1" 304 - "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 > (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > 127.0.0.1 - [2012-10-13 18:13:08] "GET /weblocks-demo/pub/scripts/weblocks.js > HTTP/1.1" 304 - "http://localhost:8080/weblocks-demo/" "Mozilla/5.0 > (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0" > > > > > -- You received this message because you are subscribed to the Google Groups "weblocks" group. To view this discussion on the web visit https://groups.google.com/d/msg/weblocks/-/ACTqCSDjQCwJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/weblocks?hl=en.
