Hi all,

Am Freitag, den 18.04.2008, 09:21 +0200 schrieb Bertrand Delacretaz:
> On Wed, Apr 16, 2008 at 5:11 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> 
> >  ...The generic script name would
> >  then be:
> >
> >      
> > {pathPrefix}/{resourceTypePath}/{resourceTypeLabel}.{selectorString}.{extension}.*
> > ...
> 
> I like the idea but I'd express it slightly differently:
> 
> {scriptPathPrefix}/{resourceTypePath}/{resourceTypeLabel}.{selectorString}.{requestMethod}.{requestExtension}.{scriptExtension}.

+1

My concern now is, how do we weight these parts:

   {scriptPathPrefix}/{resourceTypePath} - Required, scripts will
otherwise not be found
   {resourceTypeLabel} - optional, resolve doesn't care, that is no
preference
   {selectorString} - Better is longer match
   {requestMethod} - Better is to have it, required for non-GET
   {requestExtension} - Better is to have it
   {scriptExtension} - resolve only cares insofar as to find a
ScriptEngine


Now, given a GET request to bar.print.a4.html, what is the priority
order for the following (porential) script names ?

   (1) .../print.esp
   (2) .../print.a4.esp
   (3) .../print.html.esp
   (4) .../print.GET.html.esp
   (5) .../print.a4.html.esp
   (6) .../print.a4.GET.html.esp

It would probably be (6) - (5) - (2) - (4) - (3) - (1)

If there is a catch, e.g. between print.esp and print.jsp, the first
script in the listing would be selected (of course, there should not be
a catch...)

BTW, I completely agree with Bertrand that this is not very complex to
implement as it is merely repeated string operations on a list of script
paths.

WDYT ?

Regards
Felix

Reply via email to