Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
ur session >> > variables. >> > >> > Create a minimal application that reproduces the >> problem and file a JIRA. >> > Be **thorough** in your description (for example, >> originally you left out >> > the bit about Acegi). >> >

Re: [S2] Refactoring Action classes

2008-08-06 Thread Dave Newton
x27;s > deleting your session > > variables. > > > > Create a minimal application that reproduces the > problem and file a JIRA. > > Be **thorough** in your description (for example, > originally you left out > > the bit about Acegi). > > > > Does it exhibit the same behavior if you de

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
"default". >>> >>> Another reason you could lose session is moving between HTTP and HTTPS; >>> some servers will use a different session. I'm assuming they all have a >>> way to share the session, though. >>> >>> Dave >>>

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
> To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Refactoring-Action-classes-tp18813229p18859147.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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
;> Another reason you could lose session is moving between HTTP and HTTPS; >> some servers will use a different session. I'm assuming they all have a >> way to share the session, though. >> >> Dave >> >> >> ---

Re: [S2] Refactoring Action classes

2008-08-06 Thread Milan Milanovic
other reason you could lose session is moving between HTTP and HTTPS; > some servers will use a different session. I'm assuming they all have a > way to share the session, though. > > Dave > > > -----------------

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
L PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Refactoring-Action-classes-tp18813229p18851838.html Sent from the Struts - User mailing list archive at Nabble.com.

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
if cookies are disabled and JSessionID is not automatically > appended to the new location by the container/struts2. > > regards, > Jeromy Evans > > - > To unsubscribe, e-

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
>>> >>>> I have one question regarding refactoring action classes, is it much to >>>> have >>>> 20 actions per one namespace/action class ? >>>> >>>> -- >>>> Regards, Milan >>>> >>>> >

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
> > > -- > -- > Al Sutton > > W: www.alsutton.com > T: twitter.com/alsutton > > > ------------- > To unsubscribe, e-mail: [EMAIL PROT

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),

[S2] Refactoring Action classes

2008-08-04 Thread Milan Milanovic
o have 20 actions per one namespace/action class ? -- Regards, Milan -- View this message in context: http://www.nabble.com/-S2--Refactoring-Action-classes-tp18813229p18813229.html Sent from the Struts - User mailing list archive at Nabble.com. ---