[Seaside] Re: Kom redirect
Brad Fuller
brad at sonaural.com
Wed Nov 8 01:31:39 UTC 2006
Brad Fuller wrote:
> seasidehosting.st FAQ says:
> "To make your application accessible from the root, select it as default
> entry point on the Seaside configuration page and set the base-path of
> the application to "/". Note that this only works with recent versions
> of Seaside."
>
> what is the latest, or exact, version needed for this to work?
There seems to a few additional steps besides setting the 'default entry
point' and the 'base-path', as mentioned in the seasidehosting FAQ. I'm
just reporting what Ken has found and changed. Perhaps the following
method change should be considered for the generic Pier image:
---
Change PRPierMain to:
structureFrom: aRequest
| path |
path := aRequest url findTokens: $/.
path ifNotEmpty: [
path removeFirst = self dispatcher name
ifFalse: [ self error: 'Invalid Seaside dispatcher
configuration' ]].
(path notEmpty
and: [ path first = self application name
or: [ path first = (self dispatcher entryPoints keyAtValue: self
application ifAbsent: [ nil ]) ] ])
ifTrue: [ path removeFirst ].
path := path
inject: String new
into: [ :result :each | result , '/' , each ].
^ PRPathLookup
start: self kernel root path: path
onError: [ self kernel root ]
--
To start the service:
h := (HttpService on: 80 named: 'seaside')
plug: (WAKom entryPoint:
(WADispatcher default basePath: '')).
h start.
---
To stop the service:
(HttpService servicesNamed: 'seaside') do: [ :s | s stop ]
More information about the Seaside
mailing list