Author Login
Post Reply
user Digest 1 Aug 2008 17:26:57 -0000 Issue 8174
Topics (messages 189584 through 189613):
Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
189584 by: Al Sutton
189585 by: Nils-Helge Garli Hegvik
189588 by: Milan Milanovic
189589 by: Al Sutton
189590 by: Dave Newton
189591 by: Al Sutton
189592 by: Dave Newton
189594 by: Milan Milanovic
189595 by: Al Sutton
Re: Is there any way I can put package.properties file outside war file?
189586 by: Pranav
189604 by: Chris Pratt
Re: [S2] problem still with "actionRedirect" and "redirect" results (Struts2.1.2)
189587 by: Andreas Mähler
189605 by: Pierre Thibaudeau
[Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
189593 by: Dave Newton
189596 by: Dave Newton
189597 by: Al Sutton
189598 by: Al Sutton
189600 by: Milan Milanovic
189601 by: Al Sutton
189602 by: Dave Newton
189603 by: Dave Newton
189606 by: Al Sutton
189607 by: Al Sutton
189608 by: Milan Milanovic
189611 by: Dave Newton
189613 by: Al Sutton
Re: Asynchronous queue between two web applications
189599 by: Gabriel Belingueres
Re: paramsPrepareParams vs. staticParams
189609 by: Gabriel Belingueres
struts2 portlet deployment in WAS 6.1
189610 by: Edwin Quita
Re: Is this obvious ?
189612 by: Martin Gainty
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_189584.ezm (zipped)Answer : No
Only your code and your site design will affect the session variables
you have set and whether they are accessible.
Milan Milanovic wrote:
> Hi Piero,
>
> O.K. Basically I'm just asking one simple question, is it possible that
> redirect action delete session or variables in it or maybe not pass some,
> because they after redirecting I don't have that variable in session ?
>
> --
> Regards, Milan
>
>
> Piero Sartini-3 wrote:
>
>>> It's seems like that redirect action doesn't
>>> pass
>>> or set session to another action class.
>>>
>> If you can't give us the code, we aren't able to help you.
>> Session's don't need to be passed between actions. They are managed by the
>> servlet container. But it is pretty safe to assume that Struts2 is not
>> destroying your session.
>>
>> Piero
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189585.ezm (zipped)If your artifacts are that big, I suggest that you create a minimal
example that reproduces your error and then provide us with those as
examples. Otherwise, it's impossible to help. And who knows, maybe the
little example works, and then we can rule out Struts 2 in the
equation.
Nils-H
On Fri, Aug 1, 2008 at 5:45 PM, Milan Milanovic
<milanmilanovich@(protected):
>
> O.K. My 5 jsp which are used and two action classes have 5000+k lines of
> code, should I send them here ?
>
> --
> Milan
>
>
> Al Sutton wrote:
>>
>> Just making sure hurricane Dave doesn't blow through the list.
>>
>> If you ask for help, and someone offers, give them what they ask for.
>> They can always ask for a translation of bits that may be critical, but
>> unless you've rewritten large chunks of the JVM and Struts your tags and
>> code will still be understandable.
>>
>> Milan Milanovic wrote:
>>> Al ?!
>>>
>>> Dave, I cannot give you all that info, because of two things, first my
>>> classes
>>> and jsp-s are pretty complex, and not in english! So, I narrowed my
>>> scenario
>>> to this, my variable is in session -> when redirect action is clicked,
>>> there
>>> is no
>>> variable in session any more! It's seems like that redirect action
>>> doesn't
>>> pass
>>> or set session to another action class.
>>>
>>> --
>>> Regards, Milan
>>>
>>>
>>>
>>> Al Sutton wrote:
>>>
>>>> Dave,
>>>>
>>>> Repeat after me;
>>>>
>>>> It's Friday. It's nearly the weekend. And if they don't give me what I
>>>> want I'm going to take my toys away and stop playing :).
>>>>
>>>> Al.
>>>>
>>>> Dave Newton wrote:
>>>>
>>>>> --- On Fri, 8/1/08, Milan Milanovic <milanmilanovich@(protected):
>>>>>
>>>>>
>>>>>> Yes, I understand. But I don't remove session variable
>>>>>> or call invalidate anymore, and when my variable is stored
>>>>>> during the whole scenario and when I click to this redirect
>>>>>> I get lost of my variable.
>>>>>>
>>>>>>
>>>>> Then provide the artifacts I requested so people can look at it--how do
>>>>> you expect anybody to diagnose your problem if you don't provide what's
>>>>> necessary?
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>
>>>> --
>>>> --
>>>> Al Sutton
>>>>
>>>> W: www.alsutton.com
>>>> T: twitter.com/alsutton
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777372.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189588.ezm (zipped)
O.K. Thanks.
I must see why my session is deleted when redirect action is called :-(. I
checked everything 10 times, and I don't anything with session, so it is
very wierd to me why it is removed after just one click.
--
Regards, Milan
Al Sutton wrote:
>
> Answer : No
>
> Only your code and your site design will affect the session variables
> you have set and whether they are accessible.
>
> Milan Milanovic wrote:
>> Hi Piero,
>>
>> O.K. Basically I'm just asking one simple question, is it possible that
>> redirect action delete session or variables in it or maybe not pass some,
>> because they after redirecting I don't have that variable in session ?
>>
>> --
>> Regards, Milan
>>
>>
>> Piero Sartini-3 wrote:
>>
>>>> It's seems like that redirect action doesn't
>>>> pass
>>>> or set session to another action class.
>>>>
>>> If you can't give us the code, we aren't able to help you.
>>> Session's don't need to be passed between actions. They are managed by
>>> the
>>> servlet container. But it is pretty safe to assume that Struts2 is not
>>> destroying your session.
>>>
>>> Piero
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> --
> Al Sutton
>
> W: www.alsutton.com
> T: twitter.com/alsutton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189589.ezm (zipped)Seriously, refactor your code. 5K lines of code in 7 files could hide
all manner of nasties.
Milan Milanovic wrote:
> O.K. Thanks.
>
> I must see why my session is deleted when redirect action is called :-(. I
> checked everything 10 times, and I don't anything with session, so it is
> very wierd to me why it is removed after just one click.
>
> --
> Regards, Milan
>
>
> Al Sutton wrote:
>
>> Answer : No
>>
>> Only your code and your site design will affect the session variables
>> you have set and whether they are accessible.
>>
>> Milan Milanovic wrote:
>>
>>> Hi Piero,
>>>
>>> O.K. Basically I'm just asking one simple question, is it possible that
>>> redirect action delete session or variables in it or maybe not pass some,
>>> because they after redirecting I don't have that variable in session ?
>>>
>>> --
>>> Regards, Milan
>>>
>>>
>>> Piero Sartini-3 wrote:
>>>
>>>
>>>>> It's seems like that redirect action doesn't
>>>>> pass
>>>>> or set session to another action class.
>>>>>
>>>>>
>>>> If you can't give us the code, we aren't able to help you.
>>>> Session's don't need to be passed between actions. They are managed by
>>>> the
>>>> servlet container. But it is pretty safe to assume that Struts2 is not
>>>> destroying your session.
>>>>
>>>> Piero
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189590.ezm (zipped)--- On Fri, 8/1/08, Milan Milanovic <milanmilanovich@(protected):
> O.K. Basically I'm just asking one simple question, is
> it possible that redirect action delete session or variables
> in it or maybe not pass some, because they after redirecting
> I don't have that variable in session ?
NO.
There is no mechanism in S2 that arbitrarily removes session variables. The "redirectAction" result don't do anything to the session at all. In fact, very little does anything with the session at all.
Look at the S2 code. Since you're not going to help us help you, you're going to have to help yourself. All the code is available. Step through it if you have to. Read the documentation of any code you use that might involve the session; not knowing what session.invalidate() does leads me to believe you haven't spent much time with the Javadocs. Check your interceptor stack and interceptor configuration. If you don't want to step through code, add an interceptor that tracks session variables and see if an interceptor is removing it. Understand Acegi better; if it's making you log in then something is wrong and you may lose your session there.
RedirectAction is not the culprit, AFAICT, from the information you've provided.
Hurricane Dave

Attachment:
user_189591.ezm (zipped)Thhhaaarrrr she blows!!!!!! (I use she in the shipping sense of the
word... i.e. everythings a she when you're at sea for that long and it's
all blokes).
Dave Newton wrote:
> --- On Fri, 8/1/08, Milan Milanovic <milanmilanovich@(protected):
>
>> O.K. Basically I'm just asking one simple question, is
>> it possible that redirect action delete session or variables
>> in it or maybe not pass some, because they after redirecting
>> I don't have that variable in session ?
>>
>
> NO.
>
> There is no mechanism in S2 that arbitrarily removes session variables. The "redirectAction" result don't do anything to the session at all. In fact, very little does anything with the session at all.
>
> Look at the S2 code. Since you're not going to help us help you, you're going to have to help yourself. All the code is available. Step through it if you have to. Read the documentation of any code you use that might involve the session; not knowing what session.invalidate() does leads me to believe you haven't spent much time with the Javadocs. Check your interceptor stack and interceptor configuration. If you don't want to step through code, add an interceptor that tracks session variables and see if an interceptor is removing it. Understand Acegi better; if it's making you log in then something is wrong and you may lose your session there.
>
> RedirectAction is not the culprit, AFAICT, from the information you've provided.
>
> Hurricane Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189592.ezm (zipped)--- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
> Thhhaaarrrr she blows!!!!!!
*lol*
Tropical Depression Dave

Attachment:
user_189594.ezm (zipped)
Thanks huricane Dave ;-).
O.K. I'll check everything one more time. I'm using only default stack and
it worked until now good. And I fixed that "invalidate" problem, so I don't
invalidate nor clear session anywhere in my project.
--
Regards, Milan
newton.dave wrote:
>
> --- On Fri, 8/1/08, Milan Milanovic <milanmilanovich@(protected):
>> O.K. Basically I'm just asking one simple question, is
>> it possible that redirect action delete session or variables
>> in it or maybe not pass some, because they after redirecting
>> I don't have that variable in session ?
>
> NO.
>
> There is no mechanism in S2 that arbitrarily removes session variables.
> The "redirectAction" result don't do anything to the session at all. In
> fact, very little does anything with the session at all.
>
> Look at the S2 code. Since you're not going to help us help you, you're
> going to have to help yourself. All the code is available. Step through it
> if you have to. Read the documentation of any code you use that might
> involve the session; not knowing what session.invalidate() does leads me
> to believe you haven't spent much time with the Javadocs. Check your
> interceptor stack and interceptor configuration. If you don't want to step
> through code, add an interceptor that tracks session variables and see if
> an interceptor is removing it. Understand Acegi better; if it's making you
> log in then something is wrong and you may lose your session there.
>
> RedirectAction is not the culprit, AFAICT, from the information you've
> provided.
>
> Hurricane Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189595.ezm (zipped)Don't worry, I've just written a rant about not relying on dirty reads
and had to re-word it to include the footnote "This discussion is about
the SQL & JDBC Drivers and is not about porn".
Dave Newton wrote:
> --- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
>
>> Thhhaaarrrr she blows!!!!!!
>>
>
> *lol*
>
> Tropical Depression Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189586.ezm (zipped)Thanks. How do I set classpath on jboss so that classes/files from outside the war file can be loaded by my web application?
Pranav
----- Original Message ----
From: Chris Pratt <thechrispratt@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, July 31, 2008 4:50:30 PM
Subject: Re: Is there any way I can put package.properties file outside war file?
Basically Struts just loads the properties from the classpath, so anywhere
on the classpath should work.
(*Chris*)
On Thu, Jul 31, 2008 at 4:18 PM, Pranav <mehta_pranav@(protected):
> Hi,
>
> In our application, currently package.properties is packaged inside the war
> file at \web-inf\classes directory. But we would like to move it out to a
> directory like /server/default/conf inside the jboss. Is there anyway this
> can be done? If yes, can someone please guide me with step-by-step
> instructions. It will be a great help.
>
> Thanks
> Pranav
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189604.ezm (zipped)Ya might have to Google that one, I don't use jBoss myself.
(*Chris*)
On Fri, Aug 1, 2008 at 8:53 AM, Pranav <mehta_pranav@(protected):
> Thanks. How do I set classpath on jboss so that classes/files from outside
> the war file can be loaded by my web application?
>
> Pranav
>
>
>
> ----- Original Message ----
> From: Chris Pratt <thechrispratt@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Thursday, July 31, 2008 4:50:30 PM
> Subject: Re: Is there any way I can put package.properties file outside war
> file?
>
> Basically Struts just loads the properties from the classpath, so anywhere
> on the classpath should work.
> (*Chris*)
>
> On Thu, Jul 31, 2008 at 4:18 PM, Pranav <mehta_pranav@(protected):
>
> > Hi,
> >
> > In our application, currently package.properties is packaged inside the
> war
> > file at \web-inf\classes directory. But we would like to move it out to a
> > directory like /server/default/conf inside the jboss. Is there anyway
> this
> > can be done? If yes, can someone please guide me with step-by-step
> > instructions. It will be a great help.
> >
> > Thanks
> > Pranav
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189587.ezm (zipped)Hello Pierre,
I am also desperately waiting for version 2.1.3 since it seems to be
fixed there[1]. I cannot downgrade to 2.0.x, since I am using the "no
.action extension" feature of 2.1.x
CU
~Andreas
[1] https://issues.apache.org/struts/browse/WW-2676
Pierre Thibaudeau schrieb:
> The JIRA tracker lists the following issues:
> https://issues.apache.org/struts/browse/WW-1714
> as fixed in version 2.0.8, but it certainly doesn't work in 2.1.2.

Attachment:
user_189605.ezm (zipped)Thank you Andreas and Brad. I too shall be impatiently looking forward to
2.1.3!
And I'd rather not backtrack to 2.0.11 as I want Ajax/dojo as a plugin and
not as a theme.
2008/8/1 Andreas Mähler <andreas.maehler@(protected)>
> I am also desperately waiting for version 2.1.3 since it seems to be fixed
> there[1]. I cannot downgrade to 2.0.x, since I am using the "no .action
> extension" feature of 2.1.x
>
> [1] https://issues.apache.org/struts/browse/WW-2676
>
>

Attachment:
user_189593.ezm (zipped)> Seriously, refactor your code. 5K lines of code in 7 files
> could hide all manner of nasties.
We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines, mostly if-elseif.
It broke our cyclometric complexity meter, had to put in a bigger fuse. It makes Eclipse cry. It makes *me* cry. Kinda like this thread.
Dave

Attachment:
user_189596.ezm (zipped)--- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
> Don't worry, I've just written a rant about not relying on dirty
> reads and had to re-word it to include the footnote "This
> discussion is about the SQL & JDBC Drivers and is not about porn".
Well, they're both just as exciting.
Right?
Anyone?
*chirp*
Dave

Attachment:
user_189597.ezm (zipped)Captin... The cyclometric complexity meter is at max... I canne give it
any more.
Reflection can seriously help with big else-ifs. If your switching on a
variable use the variable name and value as part of the class name and
then do;
Class blahHandlerClass = Class.forName( "BlahHandlerFor"+value );
BlahHandler blahHandler = blahHandlerClass.newInstance();
blahHandler.doYourWork();
It splits your code into more manageable chunks, allows you to add
handlers for new values without touching the motherload, and it makes it
look like you're a java ninja blending in with the workplace :).
Al.
Dave Newton wrote:
>> Seriously, refactor your code. 5K lines of code in 7 files
>> could hide all manner of nasties.
>>
>
> We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines, mostly if-elseif.
>
> It broke our cyclometric complexity meter, had to put in a bigger fuse. It makes Eclipse cry. It makes *me* cry. Kinda like this thread.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189598.ezm (zipped)So you'd choose JDBC driver source code over porn.... and you called me
wierd :).
Dave Newton wrote:
> --- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
>
>> Don't worry, I've just written a rant about not relying on dirty
>> reads and had to re-word it to include the footnote "This
>> discussion is about the SQL & JDBC Drivers and is not about porn".
>>
>
> Well, they're both just as exciting.
>
> Right?
>
> Anyone?
>
> *chirp*
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189600.ezm (zipped)
Hi Dave,
one short question, don't be angry ;-).
The link which when clicked action class lost its session looks like this:
http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324&id=4
Is it possible that session is not passed through this link ?
--
Regards, Milan
newton.dave wrote:
>
>> Seriously, refactor your code. 5K lines of code in 7 files
>> could hide all manner of nasties.
>
> We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
> mostly if-elseif.
>
> It broke our cyclometric complexity meter, had to put in a bigger fuse. It
> makes Eclipse cry. It makes *me* cry. Kinda like this thread.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189601.ezm (zipped)Milan,
Please read up on how sessions work. They are NOT passed via URLs unless
you have cookies disabled, URL rewriting enabled on your appserver, and
a very sick sense of what a normal configuration is.
Al.
Milan Milanovic wrote:
> Hi Dave,
>
> one short question, don't be angry ;-).
>
> The link which when clicked action class lost its session looks like this:
>
> http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324&id=4
>
> Is it possible that session is not passed through this link ?
>
> --
> Regards, Milan
>
>
> newton.dave wrote:
>
>>> Seriously, refactor your code. 5K lines of code in 7 files
>>> could hide all manner of nasties.
>>>
>> We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
>> mostly if-elseif.
>>
>> It broke our cyclometric complexity meter, had to put in a bigger fuse. It
>> makes Eclipse cry. It makes *me* cry. Kinda like this thread.
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189602.ezm (zipped)--- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
> It splits your code into more manageable chunks, [...]
You're right, it does split *my* code. Unfortunately (well... fortunately, really) that code isn't mine and I'm forbidden from even looking at it.
Dave

Attachment:
user_189603.ezm (zipped)--- On Fri, 8/1/08, Al Sutton wrote:
> So you'd choose JDBC driver source code over porn....
And it's not filtered at work! Win-win!
Dave

Attachment:
user_189606.ezm (zipped)Ahhhh Medusa code. So named because anyone who looks at it gets so
petrified they turn to freeze up and turn to stone.
I once worked for a company where one of their classes was about 200K in
size, the reason was the developer thought that in every you needed to
catch every exception thrown, wrap it in something else, and re-throw it.
Laugh... I laughed so hard I almost peed in my pants when I saw it. (and
yes, the company was dumb enough to pay an expensive contractor to
"optimize" the code. he corrected the exception handling, which reduced
the code size and sped things up slighly, for which he got glowing
praise by the management).
Al.
Dave Newton wrote:
> --- On Fri, 8/1/08, Al Sutton <al.sutton@(protected):
>
>> It splits your code into more manageable chunks, [...]
>>
>
> You're right, it does split *my* code. Unfortunately (well... fortunately, really) that code isn't mine and I'm forbidden from even looking at it.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189607.ezm (zipped)Tonight on the Struts 2 comedy channel; How your employer is ensuring
you enjoy your day by only filtering out the boring websites to avoid
you having to waste time checking them out :).
Dave Newton wrote:
> --- On Fri, 8/1/08, Al Sutton wrote:
>
>> So you'd choose JDBC driver source code over porn....
>>
>
> And it's not filtered at work! Win-win!
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189608.ezm (zipped)
I know that they are passed through serlvet, I'm just wondering if struts
makes some error there.
Could you be positive that Struts 2.0.11.1 doesn't do anything with session,
i.e., session remains
intact and session is set for folowing action in case of redirect action ?
--
Regards, Milan
Al Sutton wrote:
>
> Milan,
>
> Please read up on how sessions work. They are NOT passed via URLs unless
> you have cookies disabled, URL rewriting enabled on your appserver, and
> a very sick sense of what a normal configuration is.
>
> Al.
>
>
> Milan Milanovic wrote:
>> Hi Dave,
>>
>> one short question, don't be angry ;-).
>>
>> The link which when clicked action class lost its session looks like
>> this:
>>
>> http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324&id=4
>>
>> Is it possible that session is not passed through this link ?
>>
>> --
>> Regards, Milan
>>
>>
>> newton.dave wrote:
>>
>>>> Seriously, refactor your code. 5K lines of code in 7 files
>>>> could hide all manner of nasties.
>>>>
>>> We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
>>> mostly if-elseif.
>>>
>>> It broke our cyclometric complexity meter, had to put in a bigger fuse.
>>> It
>>> makes Eclipse cry. It makes *me* cry. Kinda like this thread.
>>>
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> --
> Al Sutton
>
> W: www.alsutton.com
> T: twitter.com/alsutton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189611.ezm (zipped)--- On Fri, 8/1/08, Milan Milanovic wrote:
> Could you be positive that Struts 2.0.11.1 doesn't
> do anything with session, i.e., session remains intact
> and session is set for folowing action in case of
> redirect action?
Session handling is no different for a redirectAction than any other result (more or less).
The advice to write a test application that reproduces the error was good advice--without it it will even *more* difficult to help you.
Dave

Attachment:
user_189613.ezm (zipped)I refer you to the answer on sessions I gave you some emails ago.
You **REALLY** should read how session work. They are not passed through
a servlet.
Al.
Milan Milanovic wrote:
> I know that they are passed through serlvet, I'm just wondering if struts
> makes some error there.
>
> Could you be positive that Struts 2.0.11.1 doesn't do anything with session,
> i.e., session remains
> intact and session is set for folowing action in case of redirect action ?
>
> --
> Regards, Milan
>
>
>
> Al Sutton wrote:
>
>> Milan,
>>
>> Please read up on how sessions work. They are NOT passed via URLs unless
>> you have cookies disabled, URL rewriting enabled on your appserver, and
>> a very sick sense of what a normal configuration is.
>>
>> Al.
>>
>>
>> Milan Milanovic wrote:
>>
>>> Hi Dave,
>>>
>>> one short question, don't be angry ;-).
>>>
>>> The link which when clicked action class lost its session looks like
>>> this:
>>>
>>> http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324&id=4
>>>
>>> Is it possible that session is not passed through this link ?
>>>
>>> --
>>> Regards, Milan
>>>
>>>
>>> newton.dave wrote:
>>>
>>>
>>>>> Seriously, refactor your code. 5K lines of code in 7 files
>>>>> could hide all manner of nasties.
>>>>>
>>>>>
>>>> We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
>>>> mostly if-elseif.
>>>>
>>>> It broke our cyclometric complexity meter, had to put in a bigger fuse.
>>>> It
>>>> makes Eclipse cry. It makes *me* cry. Kinda like this thread.
>>>>
>>>> Dave
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189599.ezm (zipped)I believe Struts doesn't provide any help for integrating applications
with an MQ server. You need to program against the JMS API (a driver
which your MQ server vendor must provide.) but this is not related to
Struts.
2008/8/1 Janesh S <janesh@(protected)>:
>
> Hi Al,
>
> Both the applications are Struts2 applications and I also want to know if
> there is a struts way of doing this handshake. That is why I posted in this
> forum. Any suggestion/pointer would help. Thanks.
>
> Thanks,
> Jan
>
>
> Al Sutton wrote:
>>
>> Wow, a problem that doesn't mention struts anywhere and isn't even about
>> web frameworks, there's OT and way-OT.
>>
>> I think you need to find a list more in tune with your problem.
>>
>> Al.
>>
>> Janesh Subrahmanyan wrote:
>>> Hi,
>>>
>>> We have two applications and need to periodically synchronize data
>>> from one to another. One is the master (source) and other is the
>>> destination. The applications are running on tomcat servers on
>>> separate linux boxes.
>>>
>>> I thought of using a JMS based asynchronous queue for the data
>>> sync/handshake. From what I read there are multiple ways to do this -
>>> using activeMQ, openJMS, tomcat's inbuild JMS etc. Also there are a
>>> variety of supporting tools like Spring JMS etc. Not sure how to take
>>> this forward. Can someone tell which is the better way to implement
>>> this requirement? [if possible please provide pointer to some
>>> document/example to help me start with]. Thanks.
>>>
>>> Kind Regards,
>>> Jan
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/OT%3A-Asynchronous-queue-between-two-web-applications-tp18772696p18772920.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189609.ezm (zipped)staticParams provide some sort of default parameter injection when you
declare an action in your struts.xml, but it should be ok to override
this value if it came as a parameter. If the interceptor order would
be the opposite, then static parameters would take precedence over
regular parameters.
As you said, actions are POJOs and its properties can be used with
many design intentions:
1) hold URL parameters
2) hold static initialization parameters
3) Hold action result objects (but you want to write a setter too to
perform some repetitive logic)
4) hold injected objects (think S2 beans or Spring's)
From the security perspective, for the 4) case is not much I think
(because probably the ParameterInterceptor will throw an exception
when type conversion fails).
To differentiate between the 1) and both 2) and 3), it could be an
improvement if with some annotation you could tag a parameter as
"static only" and then the ParameterInterceptor will not try to set
any value there (or throw an exception).
2008/8/1 Andy Law <andy.law@(protected)>:
>
> Is there any design reason why staticParams is not called before prepare in
> the paramsPrepareParams stack?
>
> Also, in a potential RFE sort of vein, would there be any support for a
> request for a way of making staticParams non-overwritable? (i.e. the params
> defined in the action configuration XML and specified as non-mutable would
> not be overwritten by clever folk sticking
> '?paramname=value¶m2name=value2' at the end of any given URL)
>
> Later,
>
> Andy
> --
> View this message in context: http://www.nabble.com/paramsPrepareParams-vs.-staticParams-tp18773842p18773842.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189610.ezm (zipped)we have successfully deployed a struts2 portlet that used a jndi
datasource in WAS.
our EAR file had the portlet as one of it's module.
we had issues with the jndi datasource when we added another struts2 portlet.
anybody here who encountered the same problem and found a solution?
thanks,
/kits

Attachment:
user_189612.ezm (zipped)
i agree with Wes
I've seen many implementations with decorators which are ok as long as packages and version are known
e.g. @Decorator could be referencing any one of a number of interfaces
(personally I prefer implements interface as there is no ambiguity which package interface you are using)
IDE's (netbeans/eclipse) are ok as long as they dont change the code to behind the scenes conform to a framework/spec they support..a good idea that unless a known FactoryMethod or IOC container is specifically implemented the engineer should be hands on the code
I agree on the use of accessors and mutators (vs a public declaration..)
Anyone else?
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Fri, 1 Aug 2008 09:17:46 -0400
> From: wesw@(protected)
> To: user@(protected)
> Subject: Re: Is this obvious ?
>
> Although I agree that less code is good, there gets to be a point of
> terseness that you should be wary of. I would suggest keeping getters
> and setters on your struts 2 actions for a few reasons. First, Struts
> 2 Actions are simple POJOs for the most part, and by following the
> JavaBeans conventions allows the objects to be usable by more than
> just struts. Libraries like commons-beanutils and many others will
> work easily with objects following the JavaBeans conventions. Although
> it's not a hard requirement, it may help you in the future and most
> modern IDEs have helpers to generate getters and setters.
>
> -Wes
>
> On Fri, Aug 1, 2008 at 3:55 AM, Lyallex <lyallex@(protected):
> > Good Morning
> >
> > I have an Action called SomeAction
> > it has a field called someInt
> >
> > public class SomeAction extends ActionSupport{
> >
> > private int someInt;
> > public int getSomeInt(){return someInt;}
> > public void setSomeInt(int someInt){this.someInt = someInt;}
> >
> > }
> >
> > when this action is invoked from a form with value convertable to an
> > int, then in the renderer I get hold of someInt like this
> > <s:property value="someInt/>
> > This only works if there is a getter for someInt
> >
> > If I go on to edit someInt in a form with this tag in it
> > <s:textfield name="someInt"/>
> > then the value of the field is set because I provide a setter for someInt
> >
> > If I do this
> >
> > public class SomeAction extends ActionSupport{
> >
> > public int someInt;
> > //no setter or getter, the attribute is public
> >
> > }
> >
> > Then everything works fine
> >
> > The question is
> > If less code good, more code bad then why bother with the setters and getters.
> >
> > This is not a question about the merits of encapsulation and
> > information hiding in Object Oriented systems
> > It is a question about the reason for not making fields public in a
> > Struts2 Action.
> >
> > TIA
> >
> > Lyallex
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> Wesley Wannemacher
> President, Head Engineer/Consultant
> WanTii, Inc.
> http://www.wantii.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008