Re: [Mav-user] A virtual url space?
At 01:07 PM 23/03/2003, Kevin O'Neill wrote: The thing I love most about cocoon is the ability to have a virtual url space that allows for urls like /app/users/kevin/edit.html rather than he more traditional /app/users/edit.xxx?user=kevin. Is maverick able to do the former. If not is anyone else interested in adding a dispatcher subclass that allows this? I'm currently using a simple Dispatcher subclass that supports this by allowing you to specify mappings using a regex, e.g. you can match /app/users/* to the edit command by calling addCommandMatch(.*/app/users/.+, edit). Note that I don't use the .m extension for commands and have my servlet container setup to support this and I am also using REST [1] as the basis for my current project, so the dispatcher also adds the Http method to the name of the command i.e. doing an HTTP GET on /invoices/invoice01234 after an addCommandMatch(.*/invoice.+, invoice) will return a command name of GetInvoice and similarly an HTTP DELETE will result in a command of DeleteInvoice, etc.. I'd be happy to let you have a copy of it (and its unit test) if you'd like, just drop me a line. Robert 1. http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage as a starting point --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER]
[Mav-user] A virtual url space?
The thing I love most about cocoon is the ability to have a virtual url space that allows for urls like /app/users/kevin/edit.html rather than he more traditional /app/users/edit.xxx?user=kevin. Is maverick able to do the former. If not is anyone else interested in adding a dispatcher subclass that allows this? -k. -- If you don't test then your code is only a collection of bugs which apparently behave like a working program. Website: http://www.rocketred.com.au/blogs/kevin/ --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER]
RE: [Mav-user] A virtual url space?
Wouldn't this best be done as a Servlet Filter? It seems like it would be pretty easy to parse up the request string, morph it into a traditional request, and pass it on... no need to modify Maverick's Dispatcher. Jeff Schnitzer [EMAIL PROTECTED] -Original Message- From: Kevin O'Neill [mailto:[EMAIL PROTECTED] Sent: Saturday, March 22, 2003 6:08 PM To: [EMAIL PROTECTED] Subject: [Mav-user] A virtual url space? The thing I love most about cocoon is the ability to have a virtual url space that allows for urls like /app/users/kevin/edit.html rather than he more traditional /app/users/edit.xxx?user=kevin. Is maverick able to do the former. If not is anyone else interested in adding a dispatcher subclass that allows this? -k. -- If you don't test then your code is only a collection of bugs which apparently behave like a working program. Website: http://www.rocketred.com.au/blogs/kevin/ --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER] --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en [INVALID FOOTER]