question about UrlMappings and arbitrary controller parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

question about UrlMappings and arbitrary controller parameters

hamishagain@dcs.shef.ac.uk
Hi,

I want (in 0.5) to allow arbitrary parameters to pass to a controller
via the request URL. For example my scaffolded controller responds to
urls like this:

  http://localhost:8080/myapp/mycontroller/show/4

and I want to allow things like

  http://localhost:8080/myapp/mycontroller/show/4/x
  http://localhost:8080/myapp/mycontroller/show/4/x/y.png

to also hit the mycontroller/show action. I can get the first example to
work by putting a pattern like

  "/$controller/$action?/$id?/*?"

in the UrlMappings file, but I can't find a solution that will get the
second to work. (It seems that URLs with a file extension are excluded
in the UrlMappingsFilter class.)

I also can't find a way to deal with any number of parameters
(combinations of *, ** etc. didn't work). (It seems that this type of
pattern doesn't appear in the RegexUrlMapping class.)

Any ideas?

Thanks, best

Hamish Cunningham
--
http://www.dcs.shef.ac.uk/~hamish/


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email