another mapping puzzle

Poster Content
nk4um Moderator
Posts: 485
January 20, 2010 21:24
Unfortunately there is no technology to do conditional mapping in the way you suggest. If there was some kind of mapper that would do this it wouldn''t make life any better for the resolution cache anyway. In the guts of endpoints you can implement dynamic resolution and attach dependencies to the resolution and these can be dynamic - that''s how you can change a mapper definition and see changes propagate but this stuff is quite hard to get right and can easily go very wrong - just ask Peter ;-) Usually it''s best to do this kind of thing as an overlay and issue the requests rather than try to control it at the resolution level.

On a closely related topic, one of the (currently) unstated axioms of the implementation is that spaces must not resolve differently for different requests with the same identifier and verb. The can change over time but should not request-ist if you see what I mean. This means request headers, other spaces in the request scope and the requestor should not effect resolution.

Cheers, Tony
nk4um Moderator
Posts: 485
January 20, 2010 21:12Lost in the post ;-)
I''d like to use the excuse it got lost in the post! I''m pleased that we''re on the cusp of having our new support portal up an running.

Tony
nk4um User
Posts: 101
January 20, 2010 20:33No suggestions?
Or was this just lost over the holiday?
nk4um User
Posts: 101
December 30, 2009 22:08another mapping puzzle
Is there a way to do a conditional mapping?  That is, map a request like res:/something/index to res:/something/index.groovy if that exists, then res:/something/index.js, then finally res:/something/index.html if none of the previous ones are there, or if they return an exceptional condition indicating that they did not handle the request?   

This is not difficult to implement in a script, but that would seem to thwart the resolution cache.  It''s also common and simple functionality elsewhere (for instance, DirectoryIndex or stacked handlers in apache) that it may already be implemented or achievable through the module options already in place.