Re: REST plugin URL syntax

2008-07-14 Thread Jeromy Evans
Mike Watson wrote: BTW, if I want a controller to work in multiple namespaces do I need to declare seperate packages in struts.xml instead of just relying on the @Namespace annotation? Thanks again for all your help. Unfortunately when using Codeheind, you do have to create a new package

Re: REST plugin URL syntax

2008-07-14 Thread Mike Watson
Jeromy, Thanks *heaps* for finfing the time to do that. I'd pretty much done everything your demo does except for one little detail: Doh! Now to see if that's broken my fancy pants image handler... BTW, if I want a controller to work in multiple namespaces do I need to declare seperate pack

Re: REST plugin URL syntax

2008-07-11 Thread Jeromy Evans
Jeromy Evans wrote: Dusty, you're right. I just had a quick look and I do have a custom action mapper that checks whether the pattern above references an action or method for that exact reason (it checks the list of available actions and gives precedence to those). Works great for me. I r

Re: REST plugin URL syntax

2008-07-10 Thread Wes Wannemacher
http://struts.apache.org/2.x/docs/building-the-framework-from-source.html The instructions are pretty straight-forward. If you've never used maven before, it's a bit tricky at first, but once you run through it a few times, it's pretty easy. If you're building from trunk, then you might want t

Re: REST plugin URL syntax

2008-07-10 Thread Dave Newton
--- On Thu, 7/10/08, Mike Watson <[EMAIL PROTECTED]> wrote: > So what's the best way to get the latest 2.1.3 snapshot as source? Via SVN. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: REST plugin URL syntax

2008-07-10 Thread Mike Watson
So what's the best way to get the latest 2.1.3 snapshot as source? Only the jars seem to be in the maven snapshot repo... Are there any instructions on doing that somewhere? I've looked but can't find them... 2008/7/3 Jeromy Evans <[EMAIL PROTECTED]>: > Mike Watson wrote: >> >> Hi Jeromy, >> >> I

Re: REST plugin URL syntax

2008-07-08 Thread Jeromy Evans
Mike Watson wrote: The trick (I believe) is that the url should be parsed from right to left, not left to right. I don't think it's a hijack; for the application I'm working on context is very important so knowing that a given resource is being accessed in the context of another resource has a bi

Re: REST plugin URL syntax

2008-07-06 Thread Mike Watson
Controller implements ModelDriven { } >> >> >> @Namespace("/book/{bookId}") >> public class ChapterController implements ModelDriven { } >> >> >> Now that's what *should* happen. I use it in a large application that >

Re: REST plugin URL syntax

2008-07-05 Thread dusty
t it somewhere. > > I'll come back to the authorization issue separately. The quick answer > is that you can omit methods that are never permitted and/or filter URLs > based on a URI pattern and/or user's role. > > regards, > Jeromy Evans > > >

Re: REST plugin URL syntax

2008-07-02 Thread Mike Watson
Thanks heaps Jeromy, I'll grab the 2.1.3 snapshot and try again. A vanilla sample app would be great (others would probably find it useful too). Cheers Mike 2008/7/3 Jeromy Evans <[EMAIL PROTECTED]>: > Mike Watson wrote: >> >> Hi Jeromy, >> >> I've finally found time to try to resolve this but

Re: REST plugin URL syntax

2008-07-02 Thread Jeromy Evans
Mike Watson wrote: Hi Jeromy, I've finally found time to try to resolve this but haven't had much luck. Just to recap, I'm looking to be able to do something similar to the following: /book -> returns a list of books /book/123 -> returns book with id 123 /book/123/chapter/1 -> return chapter wi

Re: REST plugin URL syntax

2008-07-01 Thread Mike Watson
Hi Jeromy, I've finally found time to try to resolve this but haven't had much luck. Just to recap, I'm looking to be able to do something similar to the following: /book -> returns a list of books /book/123 -> returns book with id 123 /book/123/chapter/1 -> return chapter with id 1, retrieved fr

Re: REST plugin URL syntax

2008-06-18 Thread Jeromy Evans
Don Brown wrote: I believe it is technically possible to do this, but not at all intuitive right now. This is probably my number one improvement request for the REST plugin. You should be able change the wildcard mapper to one that recognizes named wildcards then use them in your namespace anno

Re: REST plugin URL syntax

2008-06-17 Thread dusty
scribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e

Re: REST plugin URL syntax

2008-06-17 Thread Mike Watson
Hmmm, I haven't come across the Namspace annotation stuff. I'll investigate that and see how I get on. If anyone can point me at some useful examples of how I might achieve this it'd be greatly appreciated. Thanks again for all the responses... 2008/6/17 Don Brown <[EMAIL PROTECTED]>: > I believe

Re: REST plugin URL syntax

2008-06-17 Thread Mike Watson
Hi Al, Thanks for the comments. The book/chapter description is actually a simplification of my real problem domain (which is commercially sensitive). The under-lying storage mechanism isn't simple but is quite abstract from the REST API we are providing and the hierarchical model is required to

Re: REST plugin URL syntax

2008-06-16 Thread Al Sutton
Mike, The safari signup requires a credit card which I'm not going to give so I'm afraid I can't comment after seeing the book. It has always been my understanding that the /Earth/France/Paris style of notation is a search engine optimised (SEO) layer which has the design goal of being desc

Re: REST plugin URL syntax

2008-06-16 Thread Don Brown
I believe it is technically possible to do this, but not at all intuitive right now. This is probably my number one improvement request for the REST plugin. You should be able change the wildcard mapper to one that recognizes named wildcards then use them in your namespace annotation like this: @

Re: REST plugin URL syntax

2008-06-16 Thread Mike Watson
Well that'd be nice but I'm really struggling to get it to behave the way I want. Any thoughts on how I might do this? 2008/6/17 Dave Newton <[EMAIL PROTECTED]>: > --- On Mon, 6/16/08, Mike Watson <[EMAIL PROTECTED]> wrote: >> Can anybody suggest where I would start in an attempt to >> implement t

Re: REST plugin URL syntax

2008-06-16 Thread Dave Newton
--- On Mon, 6/16/08, Mike Watson <[EMAIL PROTECTED]> wrote: > Can anybody suggest where I would start in an attempt to > implement this hierarchical model? The existing REST plugin? Just an idea. Dave - To unsubscribe, e-mail

Re: REST plugin URL syntax

2008-06-16 Thread Mike Watson
Thanks for the feedback. I actually disagree regarding whether my url syntax is restful. Have you read the O'Reilly book: "RESTful Web Services" by Leonard Richardson; Sam Ruby? If not please take a look (you can probably see sample chapters on Safari if you don't have an account). Specifically

Re: REST plugin URL syntax

2008-06-16 Thread Al Sutton
It's true that it takes a bit of reading between the lines, but basically REST relies on unique identifiers for resources, which for HTTP is commonly taken to mean a URLs of the form; http://server/resource_noun/id (to confirm this have a spin through the google results showing various exampl

Re: REST plugin URL syntax

2008-06-16 Thread Laurie Harper
It may be the case that the REST plugin can't support this (I don't know if that's true) but I don't see anything in the cited reference that says such URLs are un-RESTful. And a Struts apps should certainly be able to support them, even if it requires writing a little more code (e.g. a custom

Re: REST plugin URL syntax

2008-06-15 Thread Al Sutton
Mike, Rest URLs doesn't work that way, so the plugin is correct and your needs are not in sync with REST standards (see http://en.wikipedia.org/wiki/Representational_State_Transfer for a more details on REST). If you want to do something with multiple IDs my suggestion would be URLs along t

REST plugin URL syntax

2008-06-15 Thread Mike Watson
Hi Folks, I'm trying to use the REST plugin to implement a service that serves resources using the following url syntax: http://www.mydomain.com/rest/book/123 (which works fine) http://www.mydomain.com/rest/book/123/chapter (which throws a 500 because my book controller doesn't have a chapter