Re: [GrooveApp-devel] Stupid coding...
Status: Alpha
Brought to you by:
mbreese
From: Allen L. <ano...@gm...> - 2006-04-18 05:00:50
|
Hey Marcus, sorry for the late response, been busy getting settled into Tempe. So if I understand what you want to do here correctly, you want to be able to specify/configure what kinds of http requests you'll respond to? If so, why wouldn't a simple @Path(name=3D"/signin", requestType=3D HttpRequestType.GET) and then the method wouldn't be invoked for anything other than a http GET request for any URLs matching "/signin"? Of course I may have misunderstood what you're trying to do? Is there email commit notification going on yet? Want to set that up with = a separate grooveapp-svn list? On 3/31/06, Marcus Breese <mb...@gm...> wrote: > > I just spent 2 hours adding a feature to GrooveApp... > > then decided that I didn't like it... so I took it all out. > > What was the feature? URL Request mapping via Http method > (GET,POST,PUT,DELETE). I rewrote a good chunk of the url mapping code to > make this work... I never got it perfect, and then I realized that I was > increasing the memory requirements for url mapping at least 2-fold. And = the > code was very sloppy, as there isn't a good way to do with w/o starting t= o > make custom data structures... (or prepend the HTTP method to the path: > GET$/signin^, and that just looks silly, and you have to add a GET and a > POST for most everything). > > I ended up just making the call in the method like so: > @Path("/signin") > public Result signin(Request req) { > if (req.getRequest().getMethod().equals("GET")) { > return signinRedirect(req); > } > > > This ultimately ends up being simpler... and I thought you might > appreciate the silliness of it all. > |