[Seaside] Using a root URL

John Pierce john.raymond.pierce at gmail.com
Thu Jun 23 02:56:40 CEST 2005


Hi all,

I found that Seaside 2.5 does not quite permit the usage of a default root 
URL. If you have Comanche doing nothing but serving up Seaside apps I would 
rather drop the "/seaside/..." part of the URL. To do this you need to:

1. Run the following in a workspace: WADispatcher default basePath: '/'
2. Modify WADispatcher#handlerForRequest:relativeTo: in the following 
location (near bottom add the following line in red).

(relativePath notEmpty
 and: [relativePath first = $/])
 ifTrue: [name _ (relativePath findTokens: '/')
 at: 1
 ifAbsent: []]
 ifFalse: [name _ relativePath]. "add this line"
 entryPoints
 at: name
 ifPresent: [:n | ^ n]].
 ^ WANotFoundHandler new

In doing this you can run seaside on the default URL. For example: 
http://localhost/config instead of http://localhost/seaside/config. It is 
small, but my contribution for the day.

Regards,

John

-- 
It's easy to have a complicated idea. It's very very hard to have a simple 
idea. -- Carver Mead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20050622/18017fa3/attachment-0001.htm


More information about the Seaside mailing list