Re: S2 Action : request params and session attributes

2008-02-10 Thread Wes Wannemacher
Often parameters are sent over the wire as a group, think of a ' Thanks , i didn't want to have the request parameters as javabeans within > the Action because they are used only for one-time checks and based on > their values, some other Action properties are set. The parameter names > could chan

Re: S2 Action : request params and session attributes

2008-02-10 Thread Dave Newton
--- j alex <[EMAIL PROTECTED]> wrote: > Thanks , i didn't want to have the request parameters as javabeans within > the Action because they are used only for one-time checks and based on > their values, some other Action properties are set. The parameter names > could change later, and i didn't wa

Re: S2 Action : request params and session attributes

2008-02-10 Thread j alex
Thanks , i didn't want to have the request parameters as javabeans within the Action because they are used only for one-time checks and based on their values, some other Action properties are set. The parameter names could change later, and i didn't want that to affect the Action. Now, i tried t

Re: S2 Action : request params and session attributes

2008-02-10 Thread Dave Newton
--- j alex <[EMAIL PROTECTED]> wrote: > HttpServletRequest request = ServletActionContext.getRequest(); > HttpSession session = request.getSession(true); > if (null != request.getParameter("param1")) > session.setAttribute("attr1" , true); > else > session.setAttribute("attr1" , false); > > This w

Re: S2 Action : request params and session attributes

2008-02-10 Thread Wes Wannemacher
Is there a reason it has to happen in an action? This looks to be a bit more suited for an interceptor. I try to separate (logically) the processing by thinking along these lines - If the processing is happening on a business object, handle it in an action. If the processing is affecting the state