View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Smalltalk Server Pages

Is there a whole lot more involved than something like:
LineFormatter class>>showFormatter
...
instance addExceptionFrom: '<st>' to: '</st>' using: [:text :request :response :shelf :book :page |[(Compiler evaluate: (TextFormatter crToCrlf: text)) value: request] on: Error do:[:ex| ex returnWith: ('Error:', ex messageText)]].
...

Yes, Ithink there is.
Allthough not, if you don't care about security. If you just want to allow anybody from anywhere in the world to execute arbitrary smalltalk code directly in your swiki server image, then go on, do as you pleases. But don't ask anybody else to include this exception in their swiki because it will most likely blow up and thus have an impact on all users of the swiki.
If on the other hand you want to have a secure implementation, you will have to go a long way further as Torge did for his SecureSwikiPages

being able to run a block in a swiki page would go a long, long way.

smalltalk block server pages.cs
Block is executed each time page is viewed.
to print server time:
<st>[:request| 'Current server time: ', TimeStamp current printString]</st>
PUTTY.RND

Link to this Page

  • Swiki FAQ last edited on 7 May 2011 at 6:22 pm by 108-81-8-212.lightspeed.milwwi.sbcglobal.net