Re: Struts 3 and namespaces

2014-12-13 Thread Lukasz Lenart
Hi, I don't think throwing away the namespaces logic is a good idea - if we do it, all the users will have to migrate in almost the same manner as from S1 to S2. For most of them it will be a real pain so because of that I'm against that. There is already "slashes in action names" mechanism which

Re: Struts 3 and namespaces

2014-12-12 Thread Paul Benedict
Thanks for the responses. I appreciate knowing how namespaces are used. So it sounds to me (correct me if wrong) that namespaces provided two purposes: (1) a convenient way of chopping off the first part of the URI and (2) namespace level interceptor. I think that's pretty minimal functionality. W

Re: Struts 3 and namespaces

2014-12-12 Thread Kofford, C. Todd
We use namespaces when we have an application that runs both as a portlet & as a standalone web application. In the former case the portlet interceptor sits at the top of the stack & the latter is just our standard interceptor stack, and we use namespaces to differentiate action invocations betw

Re: Struts 3 and namespaces

2014-12-11 Thread rgm
To me it's valuable for keeping an interceptor stack separate for api requests. /api/v1/people/list Json result Vs /listpeople.action Web / template result On Dec 9, 2014 2:52 PM, "Paul Benedict" wrote: > One concept I never really liked in S2 are namespaces. I never found a good > reason to l

Re: Struts 3 and namespaces

2014-12-09 Thread Paul Benedict
Ken, I am in agreement interceptor stacks should be something like templates. I think we need to do something that's a mix of JSF and S1. JSF has a predefined lifecycle and S1 had named commands (its version of interceptors). So if you want to inject something before or after a step in the lifecyc

Re: Struts 3 and namespaces

2014-12-09 Thread Ken McWilliams
Interceptor stacks don't translate well with annotations (the struts2 package-name and action-name are required by the action-mapper to kick off the processing, two keys are a pretty minimal requirement). It only makes sense to use Struts2 package annotations as Java package-level annotations. But

Re: Struts 3 and namespaces

2014-12-09 Thread Paul Benedict
I hear your points. In addition, I noticed that namespaces don't translate well with annotations. It might just be more consistent to configure on a per action basis just by specifying the interceptor stack to use. Also, I find namespaces most frustrating when I rename URLs and have to move aroun

Re: Struts 3 and namespaces

2014-12-09 Thread Dave Newton
I used package-level interceptors from time to time, mostly for really easy auth interceptors applied to chunks of pages. There was some other use-case I had, but I can't recall what it was; it was related to some data transformations. It also provides a mechanism for grouping actions together in

Struts 3 and namespaces

2014-12-09 Thread Paul Benedict
One concept I never really liked in S2 are namespaces. I never found a good reason to logically group actions together with common interceptor setup. Rather I always find myself in the situation where the interceptor stack is globally set and actions have one-off changes. And I also never liked how