Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, newton.dave wrote: > > Please stop referring to the action as a "redirecting action". Results may > redirect; actions specify results. > > Yes, sorry, results recirect. newton.dave wrote: > > In addition to trying the things I and others have mentioned, PLEASE do > the followin

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
Please stop referring to the action as a "redirecting action". Results may redirect; actions specify results. In addition to trying the things I and others have mentioned, PLEASE do the following: 1) Look at the code for the redirectAction and step through it--this is a trivial step and would

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Hi Nils-Helge, yes, I only use session attribute in my action class which implements SessionAware interface. -- Regards, Milan Nils-Helge Garli wrote: > > And you're sure it's a session attribute and not a request attribute? > > Nils-H > > On Wed, Aug 6, 2008 at 6:49 PM, Milan Milanovic >

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, Standard action is no redirect action. My session variables was deleted somewhere between my action class method and its resulting jsp, because in my action class method I had that variable, and in jsp I don't have it any more. O.K. I can put monitoring interceptor or listener like J

Re: [S2] Refactoring Action classes

2008-08-06 Thread Jeoffrey Bakker
Maybe adding a session listener to your web.xml is a little bit easier. E.g. a listener like below import javax.servlet.http.HttpSessionAttributeListener; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener;

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
Some request parameters are prohibited, too, but those aren't session attributes. Dave --- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > From: Milan Milanovic <[EMAIL PROTECTED]> > Subject: Re: [S2] Refactoring Action classes > To: user@struts.ap

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I don't know really, I don't use HTTPS, my cookies are enabled, my > redirect action deleted my session variables, when I changed this > action to standard action it worked, NO other part of the code is > changed. What do you mean,

Re: [S2] Refactoring Action classes

2008-08-06 Thread Nils-Helge Garli Hegvik
And you're sure it's a session attribute and not a request attribute? Nils-H On Wed, Aug 6, 2008 at 6:49 PM, Milan Milanovic <[EMAIL PROTECTED]> wrote: > > Dear Dave, > > I don't know really, I don't use HTTPS, my cookies are enabled, my redirect > action deleted my session variables, when I chan

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Dave, I don't know really, I don't use HTTPS, my cookies are enabled, my redirect action deleted my session variables, when I changed this action to standard action it worked, NO other part of the code is changed. -- Milan newton.dave wrote: > > --- On Wed, 8/6/08, Milan Milanovic wrote:

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic wrote: > newton.dave wrote: >> --- On Wed, 8/6/08, Milan Milanovic wrote: >>> No, my cookies are enabled all the time. But if my >>> JSessionID is not automatically appended to the new >>> location by container/struts2 in case of redirect action, why ? >> >> Pr

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
I don't understand, but enabled cookies is defualt behavior, isn't it ? -- Regards, Milan newton.dave wrote: > > --- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> No, my cookies are enabled all the time. But if my JSessionID is not >> automatically appended to the new location

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
--- On Wed, 8/6/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > No, my cookies are enabled all the time. But if my JSessionID is not > automatically appended to the new location by container/struts2 in > case of redirect action, why ? Probably because cookies are enabled all the time. Dave --

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
Dear Jeromy, Jeromy Evans - Blue Sky Minds wrote: > > Out of interest, which container and browser are you testing with and > how is the browser sending the JSessionID to your container? > Within the browser you can determine whether you are using the same > JSessionID or a new one by monitor

Re: [S2] Refactoring Action classes

2008-08-05 Thread Jeromy Evans
Milan Milanovic wrote: Dear Al and Dave, I tried to fix that error with session variable all weekend and I didn't managed to fix it. When action is defined as redirect action to another namespace, and when that action is called, another action called method doesn't see my session variables. I ju

Re: [S2] Refactoring Action classes

2008-08-05 Thread Al Sutton
You can change the action name to something more explicit so instead of just load, save, load, save, you could have firstObjectLoad, firstObjectSave, You may want to look up RESTful URLs to get some inspiration. Al. Milan Milanovic wrote: Thanks Al. But in this way, how I'll now which l

Re: [S2] Refactoring Action classes

2008-08-05 Thread Milan Milanovic
Thanks Al. But in this way, how I'll now which load is for which class when defining a link ? -- Regards, Milan Al Sutton wrote: > > More like; > > extends="struts-default"> >class="FirstObjectManager">... >class="FirstObjectManager">... >class="SecondObjectManager">

Re: [S2] Refactoring Action classes

2008-08-05 Thread Al Sutton
More like; ... ... ... ... ... You can also use singletons, utility classes, and good old-fashioned inheritance to reduce code duplication (remember, Actions don't have to extend ActionSupport, ActionSupport is just a utility class). Al. Milan Milan

Re: [S2] Refactoring Action classes

2008-08-05 Thread Milan Milanovic
Dear Al, O.K. You suggest that I have multiple classes in one package/namespace, like this: ... ... ... ? I understand what are you talking about, but my class is connected to little bit

RE: [S2] Refactoring Action classes

2008-08-04 Thread Martin Gainty
gt; Date: Mon, 4 Aug 2008 16:47:24 +0100> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: [S2] Refactoring Action classes> > You don't need to have all your actions for a namespace in a single > class, you can use multiple classes.> > I usually group

Re: [S2] Refactoring Action classes

2008-08-04 Thread Al Sutton
You don't need to have all your actions for a namespace in a single class, you can use multiple classes. I usually group methods acting on a common object into a single class which usually leaves me with the 5 public methods in a class which map to actions (typically CRUD plus a View method),