Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 24 Jul 2009 13:28:45 -0000 Issue 8768

user-digest-help

2009-07-24


Author LoginPost Reply

user Digest 24 Jul 2009 13:28:45 -0000 Issue 8768

Topics (messages 201029 through 201052):

Re: Struts w/Ajax with Struts again
 201029 by: Martin Gainty

Re: studying struts2 framework, ActionInvocation question
 201030 by: Martin Gainty
 201032 by: Dimitrios Christodoulakis
 201042 by: Dave Newton

action does not declare serialversionuid warning
 201031 by: anand nandu
 201034 by: anand nandu
 201035 by: Kawczynski, David
 201036 by: Greg Lindholm
 201037 by: anand nandu
 201038 by: Kawczynski, David
 201039 by: anand nandu

Is 'expression' a keyword in 2.1.6?
 201033 by: wkbutler
 201047 by: wkbutler

Prevent Initial Validation Struts 2
 201040 by: tagged000013.yahoo.ca
 201041 by: Greg Lindholm
 201050 by: Pawe³ Wielgus

custom tag development?
 201043 by: Mitch Claborn
 201046 by: Musachy Barroso

tag syntax question
 201044 by: Mitch Claborn
 201045 by: Musachy Barroso
 201048 by: Dale Newfield
 201049 by: Musachy Barroso
 201052 by: Mitch Claborn

Re: s2 and default locale/language
 201051 by: Marsman

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_201029.ezm (zipped)

please display
all jsp
all xml (web.xml,struts.xml,struts-default.xml..and struts-config.xml if applicable)
all source for background Java classes (including all Actions and all referenced beans)
which version struts you are using?
which version dojo you are using?
(your main dojo.js should contain the line: dojo.version={major:0,minor:4,patch:3..} version=0.43)

Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.






> Date: Thu, 23 Jul 2009 09:39:51 -0400
> From: newton.dave@(protected)
> To: user@(protected)
> Subject: Re: Struts w/Ajax with Struts again
>
> cpanon wrote:
> > What I was able to reproduce was that if I enter the action with an
> > Ajax call, using prototype, and return with
> > mapping.getInputForward(), the session objects do not get updated;
> > even though I update them in the action. If, however I enter the
> > action with a click off a html:submit button the session objects do
> > get updated and I see the current values on the form. I never
> > expected that. Should processing through an action and the updating
> > of the session objects, be the same however the action was called?
>
> Why would the form on the main page be updated by the results of an Ajax
> call if the Ajax call processing doesn't do anything with the form?
>
> Ajax calls happen in the background. *Nothing* on the calling page will
> be updated unless the Ajax return handler updates it.
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

_________________________________________________________________
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports

Attachment: user_201030.ezm (zipped)

you're speaking of org.apache.struts2.s1.ActionFormValidationInterceptor?
which is an Interceptor class contained within Struts2-Struts1-plugin

an excellent step by step tutorial on Struts2-Struts1-plugin is available at
http://www.slideshare.net/mraible/migrating-from-struts-1-to-struts-2-presentation

Maven is a build environment which outputs distros based on version specific plugins
although l/t you'll want to use it for development it can be a bit daunting to setup properly
HINT: I use localRepository always to avoid disconnect probs with main maven plugin remoteRepositories

fairly intuitive tutorial is located at
http://maven.apache.org/guides/getting-started/index.html

hth
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 23 Jul 2009 07:51:37 -0500
> Subject: Re: studying struts2 framework, ActionInvocation question
> From: dimi.chr@(protected)
> To: user@(protected)
>
> Just another thought I had this morning.
>
> Usually the framework is rather transparent to the struts user who
> only creates actions with their corresponding results and run the
> application on a server. I mean if the user doesn't have to customize
> anything, create an interceptor, or even bother with session objects,
> they might not encounter Proxy, Action Invocation, or Invocation
> Context at all in their own code.
>
> But, of course, those objects are part of the framework, and they must
> be instantiated and initialized without such user even knowing about
> it. Which means that initialization happens within the framework
> itself, and not in the user's code necessarily, right?
>
> So putting a breakpoint in the constructor of my
> intercept(ActionInvocation actionInvocation) method, possibly won't
> show me much, right? I have yet to try it, but this was just a
> thought.
>
> On Wed, Jul 22, 2009 at 8:59 PM, Musachy Barroso<musachy@(protected):
> > an easier way, is to install the maven plugin for eclipse, and then
> > checkout the struts 2 code, and import apps/blank/pom.xml as a maven
> > project. Then you can run and debug it from eclipse without having to
> > download any code.
> >
> > musachy
> >
> > On Wed, Jul 22, 2009 at 6:23 PM, Dimitrios
> > Christodoulakis<dimi.chr@(protected):
> >> Thanks Dave and Martin. I learn something new every time!
> >>
> >> I was able to attach the source to struts2-core-2.1.6.jar and
> >> xwork-2.1.2.jar by first downloading the source code and pointing to
> >> the it from within eclipse.
> >>
> >> project->right click->properties->Java build path->Libraries->select
> >> jar->Source Attachment->edit
> >>
> >> I will try the breakpoint next. I hope eclipse can trace a breakpoint
> >> all the way to at least classes within those jars. Attaching code to
> >> each and every jar in the project sounds a bit tedious. I mean I
> >> manually downloaded the source and attached it. So for all other jars,
> >> spring, hibernate, commons, etc -- should take a long time. Unless it
> >> could be done automatically by eclipse, but I am not sure. Probably
> >> not
> >>
> >> On Wed, Jul 22, 2009 at 8:11 PM, Martin Gainty<mgainty@(protected):
> >>>
> >>> unless someone redesigned Eclipse breakpoint wont be able to see a class packaged in the jar *at least with ganymede*
> >>> stick with debug algorithm's mentioned earlier
> >>> (main focus would be to debug action initialisation as dave mentioned)
> >>> ...
> >>> Martin
> >>> ______________________________________________
> >>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> >>>
> >>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> >>>
> >>>
> >>>
> >>>
> >>>> Date: Wed, 22 Jul 2009 19:49:23 -0500
> >>>> Subject: Re: studying struts2 framework, ActionInvocation question
> >>>> From: dimi.chr@(protected)
> >>>> To: user@(protected)
> >>>>
> >>>> Dave Newton wrote:
> >>>> >
> >>>> > Won't help track action invocation initialization, methinks.
> >>>> >
> >>>>
> >>>> Is there a particular way you would recommend to go about doing it
> >>>> actually? I am using eclipse for my ide, but I am not sure if
> >>>> breakpoints can trace through the compiled classes in the jars.
> >>>>
> >>>> Much appreciate the advice.
> >>>>
> >>>> On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton<newton.dave@(protected):
> >>>> > Martin Gainty wrote:
> >>>> >>
> >>>> >> does vi have breakpoints.. am i missing something?
> >>>> >
> >>>> > ....
> >>>> >
> >>>> > In this case you actually saw something nobody else did--a vi reference.
> >>>> >
> >>>> >> or debug
> >>>> >> before craig and ted left (i wished they both stayed but thats another
> >>>> >> topic)
> >>>> >> a DebuggingInterceptor was coded and is activated by
> >>>> >> struts.devMode = true
> >>>> >> http://struts.apache.org/2.0.14/docs/debugging.html
> >>>> >>
> >>>> >> then address would contain ?debug=<parameter> in url should specifies
> >>>> >> either
> >>>> >> ?debug=xml or ?debug=console to the URL.
> >>>> >
> >>>> > Won't help track action invocation initialization, methinks.
> >>>> >
> >>>> > Dave
> >>>> >
> >>>> > ---------------------------------------------------------------------
> >>>> > 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)
> >>>>
> >>>
> >>> _________________________________________________________________
> >>> Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
> >>> http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> > ---------------------------------------------------------------------
> > 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)
>

_________________________________________________________________
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports

Attachment: user_201032.ezm (zipped)
Actually I was speaking of my own custom interceptor (Authentiaction
interceptor) which I add on top of the default package.

Originally, I wanted to unit test my interceptor class and
particularly its intercept method which takes an ActionInvocation as a
parameter. My concern was how to create and instantiate a mock
ActionInvocation implementation and bind a dummy action to it.

This is leading me through the struts2 and xwork source code, which I
am thinking of running using breakpoints to see how the
ActionInvocation is intantiated. And at least follow the basic
workflow of the framework when it is trying to execute an action.

By the way I noticed that when I downloaded the s2 source code, it
didn't come with the opensymphony packages... Does the xwork source
has to be downloaded separately?

On Thu, Jul 23, 2009 at 11:11 AM, Martin Gainty<mgainty@(protected):
>
> you're speaking of org.apache.struts2.s1.ActionFormValidationInterceptor?
> which is an Interceptor class contained within Struts2-Struts1-plugin
>
> an excellent step by step tutorial on Struts2-Struts1-plugin is available at
> http://www.slideshare.net/mraible/migrating-from-struts-1-to-struts-2-presentation
>
> Maven is a build environment which outputs distros based on version specific plugins
> although l/t you'll want to use it for development it can be a bit daunting to setup properly
> HINT: I use localRepository always to avoid disconnect probs with main maven plugin remoteRepositories
>
> fairly intuitive tutorial is located at
> http://maven.apache.org/guides/getting-started/index.html
>
> hth
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>> Date: Thu, 23 Jul 2009 07:51:37 -0500
>> Subject: Re: studying struts2 framework, ActionInvocation question
>> From: dimi.chr@(protected)
>> To: user@(protected)
>>
>> Just another thought I had this morning.
>>
>> Usually the framework is rather transparent to the struts user who
>> only creates actions with their corresponding results and run the
>> application on a server. I mean if the user doesn't have to customize
>> anything, create an interceptor, or even bother with session objects,
>> they might not encounter Proxy, Action Invocation, or Invocation
>> Context at all in their own code.
>>
>> But, of course, those objects are part of the framework, and they must
>> be instantiated and initialized without such user even knowing about
>> it. Which means that initialization happens within the framework
>> itself, and not in the user's code necessarily, right?
>>
>> So putting a breakpoint in the constructor of my
>> intercept(ActionInvocation actionInvocation) method, possibly won't
>> show me much, right? I have yet to try it, but this was just a
>> thought.
>>
>> On Wed, Jul 22, 2009 at 8:59 PM, Musachy Barroso<musachy@(protected):
>> > an easier way, is to install the maven plugin for eclipse, and then
>> > checkout the struts 2 code, and import apps/blank/pom.xml as a maven
>> > project. Then you can run and debug it from eclipse without having to
>> > download any code.
>> >
>> > musachy
>> >
>> > On Wed, Jul 22, 2009 at 6:23 PM, Dimitrios
>> > Christodoulakis<dimi.chr@(protected):
>> >> Thanks Dave and Martin. I learn something new every time!
>> >>
>> >> I was able to attach the source to struts2-core-2.1.6.jar and
>> >> xwork-2.1.2.jar by first downloading the source code and pointing to
>> >> the it from within eclipse.
>> >>
>> >> project->right click->properties->Java build path->Libraries->select
>> >> jar->Source Attachment->edit
>> >>
>> >> I will try the breakpoint next. I hope eclipse can trace a breakpoint
>> >> all the way to at least classes within those jars. Attaching code to
>> >> each and every jar in the project sounds a bit tedious. I mean I
>> >> manually downloaded the source and attached it. So for all other jars,
>> >> spring, hibernate, commons, etc -- should take a long time. Unless it
>> >> could be done automatically by eclipse, but I am not sure. Probably
>> >> not
>> >>
>> >> On Wed, Jul 22, 2009 at 8:11 PM, Martin Gainty<mgainty@(protected):
>> >>>
>> >>> unless someone redesigned Eclipse breakpoint wont be able to see a class packaged in the jar *at least with ganymede*
>> >>> stick with debug algorithm's mentioned earlier
>> >>> (main focus would be to debug action initialisation as dave mentioned)
>> >>> ...
>> >>> Martin
>> >>> ______________________________________________
>> >>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>> >>>
>> >>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> >>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>> Date: Wed, 22 Jul 2009 19:49:23 -0500
>> >>>> Subject: Re: studying struts2 framework, ActionInvocation question
>> >>>> From: dimi.chr@(protected)
>> >>>> To: user@(protected)
>> >>>>
>> >>>> Dave Newton wrote:
>> >>>> >
>> >>>> > Won't help track action invocation initialization, methinks.
>> >>>> >
>> >>>>
>> >>>> Is there a particular way you would recommend to go about doing it
>> >>>> actually? I am using eclipse for my ide, but I am not sure if
>> >>>> breakpoints can trace through the compiled classes in the jars.
>> >>>>
>> >>>> Much appreciate the advice.
>> >>>>
>> >>>> On Wed, Jul 22, 2009 at 7:44 PM, Dave Newton<newton.dave@(protected):
>> >>>> > Martin Gainty wrote:
>> >>>> >>
>> >>>> >> does vi have breakpoints.. am i missing something?
>> >>>> >
>> >>>> > ....
>> >>>> >
>> >>>> > In this case you actually saw something nobody else did--a vi reference.
>> >>>> >
>> >>>> >> or debug
>> >>>> >> before craig and ted left (i wished they both stayed but thats another
>> >>>> >> topic)
>> >>>> >> a DebuggingInterceptor was coded and is activated by
>> >>>> >> struts.devMode = true
>> >>>> >> http://struts.apache.org/2.0.14/docs/debugging.html
>> >>>> >>
>> >>>> >> then address would contain ?debug=<parameter> in url should specifies
>> >>>> >> either
>> >>>> >> ?debug=xml or ?debug=console to the URL.
>> >>>> >
>> >>>> > Won't help track action invocation initialization, methinks.
>> >>>> >
>> >>>> > Dave
>> >>>> >
>> >>>> > ---------------------------------------------------------------------
>> >>>> > 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)
>> >>>>
>> >>>
>> >>> _________________________________________________________________
>> >>> Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
>> >>> http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >> For additional commands, e-mail: user-help@(protected)
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >
>> > ---------------------------------------------------------------------
>> > 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)
>>
>
> _________________________________________________________________
> Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
> http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports


Attachment: user_201042.ezm (zipped)
Dimitrios Christodoulakis wrote:
> By the way I noticed that when I downloaded the s2 source code, it
> didn't come with the opensymphony packages... Does the xwork source
> has to be downloaded separately?

Yes.

Dave


Attachment: user_201031.ezm (zipped)

when Action extends Action Support i get a warning action does not declare
serialversionuid.
Please excuse my ignorance if this was basic questions...

1) what is advantage of declaring serialversionuid in action class?

2) when does the action class gets serialized.Even in Clustered Environment
i don't see action needs serialization.
Please tell any scenario where action needs to be serialized.?

3) If my action does not get serialized why do i need to add unnecessary
code(declare serialversionuid) to my action making it Big.?

4) I assume serialversionuid makes sense only when the action gets
serialized.is this right?

I will be really grateful if someone shares your ideas.
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201034.ezm (zipped)

when Action extends Action Support i get a warning action does not declare
serialversionuid.
Please excuse my ignorance if this was basic questions...

1) what is advantage of declaring serialversionuid in action class?

2) when does the action class gets serialized.Even in Clustered Environment
i don't see action needs serialization.
Please tell any scenario where action needs to be serialized.?

3) If my action does not get serialized why do i need to add unnecessary
code(declare serialversionuid) to my action making it Big.?

4) I assume serialversionuid makes sense only when the action gets
serialized.is this right?

I will be really grateful if someone shares your ideas.
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201035.ezm (zipped)
Adding that to your action classes would help to eliminate user sessions
loosing state in between servletcontext restarts. Since action classes
will most likely contain several POJO-like properties which are set from
user input, it is not be a bad idea to add that variable to your
classes. It would only add one line of code to your action classes.


> -----Original Message-----
> From: anand nandu [mailto:anand8412@(protected)]
> Sent: Thursday, July 23, 2009 12:40 PM
> To: user@(protected)
> Subject: action does not declare serialversionuid warning
>
>
> when Action extends Action Support i get a warning action
> does not declare
> serialversionuid.
> Please excuse my ignorance if this was basic questions...
>
> 1) what is advantage of declaring serialversionuid in action class?
>
> 2) when does the action class gets serialized.Even in
> Clustered Environment
> i don't see action needs serialization.
> Please tell any scenario where action needs to be serialized.?
>
> 3) If my action does not get serialized why do i need to add
> unnecessary
> code(declare serialversionuid) to my action making it Big.?
>
> 4) I assume serialversionuid makes sense only when the action gets
> serialized.is this right?
>
> I will be really grateful if someone shares your ideas.
> --
> View this message in context:
> http://www.nabble.com/action-does-not-declare-serialversionuid
-warning-tp24629700p24629700.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)
>
>
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.



Attachment: user_201036.ezm (zipped)
>
>
> when Action extends Action Support i get a warning action does not declare
> serialversionuid.
> Please excuse my ignorance if this was basic questions...
>
> 1) what is advantage of declaring serialversionuid in action class?
>
> 2) when does the action class gets serialized.Even in Clustered Environment
> i don't see action needs serialization.
> Please tell any scenario where action needs to be serialized.?
>
> 3) If my action does not get serialized why do i need to add unnecessary
> code(declare serialversionuid) to my action making it Big.?
>
> 4) I assume serialversionuid makes sense only when the action gets
> serialized.is this right?
>
> I will be really grateful if someone shares your ideas.
>

I can answer the obvious part of this; You get the warning because your
action is extending ActionSupport and ActionSupport implements
Serializable. If needed you can read about serialVersionUID here [1] or
just google serialVersionUID as there are lots of sites that explain it. So
since your class is Serializable you should add serialVersionUID to comply
with the 'interface' and stop the warnings. As for point 3) it's hard see
how adding a single "static final long" can be blamed for making your action
'Big'.

The more interesting question is; Why does ActionSupport implement
Serializable? I believe your argument in 2) make sense, the action objects
should never be serialized, or I'm I also missing something?


[1] http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html

Attachment: user_201037.ezm (zipped)

"Adding that to your action classes would help to eliminate user sessions
loosing state in between servletcontext restarts."

I really didnt understand what exactly this means...
You are talking abt the form fields parameters in jsp?
--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201038.ezm (zipped)
This is off-topic, so here's a high-level explanation of serializing.

Imagine submitting a form, and in the middle of it being processed by
struts2 some administrator decided it's time to restart the
servletContext. What any decent appserver will do is serialize any
in-memory objects, so that when the app server comes back up it can
reconstitute those objects and the appserver can pick up where it left
off. The alternative would be that your submission barfs, and you get
to start all over again. Not very user friendly.

What if the administrator restarted the context because the action class
that was handing your submission was updated. What if the new version
didn't contain the same variables as the one that was just serialized
does? The ID helps the app server when re-constituting, so it doesn't
try to populate obsolete variables.

If this still doesn't make sense, try googling and reading up a bit.

HTH,
-dave

> -----Original Message-----
> From: anand nandu [mailto:anand8412@(protected)]
> Sent: Thursday, July 23, 2009 1:49 PM
> To: user@(protected)
> Subject: RE: action does not declare serialversionuid warning
>
>
> "Adding that to your action classes would help to eliminate
> user sessions
> loosing state in between servletcontext restarts."
>
> I really didnt understand what exactly this means...
> You are talking abt the form fields parameters in jsp?
> --
> View this message in context:
> http://www.nabble.com/action-does-not-declare-serialversionuid
-warning-tp24629700p24631059.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)
>
>
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.



Attachment: user_201039.ezm (zipped)

I think i got why it makes sense to add that extra line in my action.
Appreciate ur time for explaining that

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201033.ezm (zipped)

Hi - this may be a dumb question, but I'm having a validation issue since
upgrading to 2.1.6 (at least I think that's when it started).

Saving an entity called 'Expression' fails - always fails the validation for
field-validator 'requiredstring'. Here is the validator definition:

<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
1.0.2//EN"
  "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
<validators>
  <field name="expression.expression">
    <field-validator type="requiredstring">
       <message key="errors.required"/>
    </field-validator>
  </field>
  <field name="expression.expressionType">
    <field-validator type="requiredstring">
       <message key="errors.required"/>
    </field-validator>
  </field>
  <field name="expression.returnType">
    <field-validator type="requiredstring">
       <message key="errors.required"/>
    </field-validator>
  </field>
</validators>


and the debug result while saving, showing that there is data in all 3
fields:


DEBUG [btpool0-4] ParametersInterceptor.debug(57) | Setting params
expression.createDate => [ 07/21/2009 ] expression.createUser => [ -2 ]
expression.deleteDate => [ ] expression.deleteUser => [ ]
expression.expression => [ test ] expression.expressionId => [ 3 ]
expression.expressionType => [ FTL ] expression.lastUpdate => [ 07/22/2009 ]
expression.lastUpdateUser => [ -2 ] expression.returnType => [ Number ]
method:cancel => [ Cancel ] questionId => [ 545 ]


All 3 required fields fail with messages "XXX is a required field".

Changing the field-validator to just "required" doesn't help.  

Before I rename this entity and all it's relatives, I thought I'd ask here
to see if anyone knows if this has become a keyword. I'm pretty darn sure
this worked for me before I upgraded to 2.1.6, at least when I originally
built it back in April/May.  

Thanks for ideas -
Kent

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201047.ezm (zipped)

Answer appears to be 'no' after renaming the object and fields. Looks like
something else changed.


wkbutler wrote:
>
> Hi - this may be a dumb question, but I'm having a validation issue since
> upgrading to 2.1.6 (at least I think that's when it started).
>
> Saving an entity called 'Expression' fails - always fails the validation
> for field-validator 'requiredstring'. Here is the validator definition:
>
> <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
> 1.0.2//EN"
>   "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
> <validators>
>   <field name="expression.expression">
>      <field-validator type="requiredstring">
>         <message key="errors.required"/>
>      </field-validator>
>   </field>
>   <field name="expression.expressionType">
>      <field-validator type="requiredstring">
>         <message key="errors.required"/>
>      </field-validator>
>   </field>
>   <field name="expression.returnType">
>      <field-validator type="requiredstring">
>         <message key="errors.required"/>
>      </field-validator>
>   </field>
> </validators>
>
>
> and the debug result while saving, showing that there is data in all 3
> fields:
>
>
> DEBUG [btpool0-4] ParametersInterceptor.debug(57) | Setting params
> expression.createDate => [ 07/21/2009 ] expression.createUser => [ -2 ]
> expression.deleteDate => [ ] expression.deleteUser => [ ]
> expression.expression => [ test ] expression.expressionId => [ 3 ]
> expression.expressionType => [ FTL ] expression.lastUpdate => [ 07/22/2009
> ] expression.lastUpdateUser => [ -2 ] expression.returnType => [ Number ]
> method:cancel => [ Cancel ] questionId => [ 545 ]
>
>
> All 3 required fields fail with messages "XXX is a required field".
>
> Changing the field-validator to just "required" doesn't help.  
>
> Before I rename this entity and all it's relatives, I thought I'd ask here
> to see if anyone knows if this has become a keyword. I'm pretty darn sure
> this worked for me before I upgraded to 2.1.6, at least when I originally
> built it back in April/May.  
>
> Thanks for ideas -
> Kent
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.



Attachment: user_201040.ezm (zipped)
I am new to Struts 2 and use annotation driven validations and they are working correctly. The only issue I have is that the validations are performed even upon navigating to my action for the first time.

Ie All the fields on the web form are initially blank and also all my error msgs from several @RequiredString fields are also displayed.

Is there is simple way to prevent error msgs when the action is initially navigated to?

--
This message was sent on behalf of tagged000013@(protected)
http://www.opensubscriber.com/messages/user@(protected)


Attachment: user_201041.ezm (zipped)
> I am new to Struts 2 and use annotation driven validations and they are
> working correctly. The only issue I have is that the validations are
> performed even upon navigating to my action for the first time.
>
> Ie All the fields on the web form are initially blank and also all my error
> msgs from several @RequiredString fields are also displayed.
>
> Is there is simple way to prevent error msgs when the action is initially
> navigated to?
>

If you have CRUD style actions you annotate the action methods that don't
need validation with @SkipValidation.

For example my CRUD actions might have doNew() , doCreate(), doEdit(), and
doUpdate() methods and I will add the @SkipValidation to doNew() and
doEdit() like this:

@SkipValidation
public String doNew(){...}

public String doCreate(){...}

@SkipValidation
public String doEdit(){...}

public String doUpdate(){...}

Attachment: user_201050.ezm (zipped)
Hi,
You can navigate straight to my-action!input,
no validation is performed then.

Best greetings,
Paweł Wielgus.


2009/7/23 Greg Lindholm <greg.lindholm@(protected)>:
>> I am new to Struts 2 and use annotation driven validations and they are
>> working correctly. The only issue I have is that the validations are
>> performed even upon navigating to my action for the first time.
>>
>> Ie All the fields on the web form are initially blank and also all my error
>> msgs from several @RequiredString fields are also displayed.
>>
>> Is there is simple way to prevent error msgs when the action is initially
>> navigated to?
>>
>
> If you have CRUD style actions you annotate the action methods that don't
> need validation with @SkipValidation.
>
> For example my CRUD actions might have doNew() , doCreate(), doEdit(), and
> doUpdate() methods and I will add the @SkipValidation to doNew() and
> doEdit() like this:
>
> @SkipValidation
> public String doNew(){...}
>
> public String doCreate(){...}
>
> @SkipValidation
> public String doEdit(){...}
>
> public String doUpdate(){...}
>


Attachment: user_201043.ezm (zipped)
Hoping someone can give me some pointers on how to get started on
developing my own tag.

I want to develop a custom tag to use within Struts 2, kind of like
<s:iterator>. What I have in mind is something like this:

<abc:mytag>
other stuff, including other struts tags
</abc:mytag>

the tag would iterate over the stuff contained in the tag, based on
non-trivial logic, and also generate output both before and after the
other stuff. This may eventually turn into a tag to generate an HTML
table. Any pointers on how to get started developing such an animal are
appreciated.


Mitch



Attachment: user_201046.ezm (zipped)
Look at the "component" tag, you might be able to create a tag without
writing any code.

musachy

On Thu, Jul 23, 2009 at 3:50 PM, Mitch Claborn<mitch@(protected):
> Hoping someone can give me some pointers on how to get started on
> developing my own tag.
>
> I want to develop a custom tag to use within Struts 2, kind of like
> <s:iterator>.  What I have in mind is something like this:
>
> <abc:mytag>
> other stuff, including other struts tags
> </abc:mytag>
>
> the tag would iterate over the stuff contained in the tag, based on
> non-trivial logic, and also generate output both before and after the
> other stuff.  This may eventually turn into a tag to generate an HTML
> table.  Any pointers on how to get started developing such an animal are
> appreciated.
>
>
> Mitch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Attachment: user_201044.ezm (zipped)
I'm a big confused about the syntax in struts tags. For example, I have
the following:

<s:set var="category" value="display.category" />
<s:set var="you_are_here_path" value="#category.path" />

"display" is a property on the action. The first one does not need the
#, but the second one does. Why? What does the # signify?

Some tags seem to need the ognl construct %{.....}. What are the rules
around when this construct is needed as opposed to one of the others above?


Mitch



Attachment: user_201045.ezm (zipped)
you need to read about the value stack. long story short, the VS
stacks (duh) objects. When an expressions like:

"name"

is evaluated, struts will go from the top to the bottom of the stack,
trying to find a "name" field or "getName" method, until one is found.
Different things are placed in the stack, the last action executed is
placed on the stack, the iterator tag pushes the current value into
the stack and so on.

Objects can be put in the stack by name, like the HttpServletRequest
object. Theseobjects are accessed using the "#" notation, like
"#request". The "set" tag can add things to the stack by name(for
example).

About the %{}, this part is confusing, for the sake of saving a few
key strokes. Certain attributes in the tags are expected to be strings
literals, like "id", so you can do:

<s:a id="myid" />

instead of the more verbose, but also correct:

<s:a id="%{'myid'}" />

other attributes are expected to be expressions, so you can do:

<s:property value="#request.something" />

instead of the more verbose, but also correct:

<s:property value="%{#request.something}" />

so how do you know which one is which? look at the tag documentation,
as a general rule, for "id" or "name" attributes I use string
literals, and for anything else I add %{...}, because I cant spent my
insufficient memory remembering which one is which :)

musachy

On Thu, Jul 23, 2009 at 4:01 PM, Mitch Claborn<mitch@(protected):
> I'm a big confused about the syntax in struts tags.  For example, I have
> the following:
>
> <s:set var="category" value="display.category" />
> <s:set var="you_are_here_path" value="#category.path" />
>
> "display" is a property on the action.  The first one does not need the
> #, but the second one does.  Why?  What does the # signify?
>
> Some tags seem to need the ognl construct %{.....}.  What are the rules
> around when this construct is needed as opposed to one of the others above?
>
>
> Mitch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Attachment: user_201048.ezm (zipped)
Musachy Barroso wrote:
> Objects can be put in the stack by name, like the HttpServletRequest
> object. Theseobjects are accessed using the "#" notation, like
> "#request". The "set" tag can add things to the stack by name(for
> example).

The only confusing bit about the way that was just described is that
things put into scope are not added to the stack. There's both a stack
of objects and a hash mapping names to objects. When you "set"
something you're adding it to the hash table, not the value stack. To
later address something in this hash table you prefix it with #.

-Dale


Attachment: user_201049.ezm (zipped)
yes that's a good catch Dale, from the API point of view they are
stored in a map in the ValueStack instance, but from a user point of
view you could say they are stored in the "valuestack context".

musachy

On Thu, Jul 23, 2009 at 9:03 PM, Dale Newfield<dale@(protected):
> Musachy Barroso wrote:
>>
>> Objects can be put in the stack by name, like the HttpServletRequest
>> object. Theseobjects are accessed using the "#" notation, like
>> "#request". The "set" tag can add things to the stack by name(for
>> example).
>
> The only confusing bit about the way that was just described is that things
> put into scope are not added to the stack.  There's both a stack of objects
> and a hash mapping names to objects.  When you "set" something you're adding
> it to the hash table, not the value stack.  To later address something in
> this hash table you prefix it with #.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd


Attachment: user_201052.ezm (zipped)
Thanks to both. The haze on the subject is beginning to clear.

mitch


Musachy Barroso wrote:
> yes that's a good catch Dale, from the API point of view they are
> stored in a map in the ValueStack instance, but from a user point of
> view you could say they are stored in the "valuestack context".
>
> musachy
>
> On Thu, Jul 23, 2009 at 9:03 PM, Dale Newfield<dale@(protected):
>  
>> Musachy Barroso wrote:
>>  
>>> Objects can be put in the stack by name, like the HttpServletRequest
>>> object. Theseobjects are accessed using the "#" notation, like
>>> "#request". The "set" tag can add things to the stack by name(for
>>> example).
>>>    
>> The only confusing bit about the way that was just described is that things
>> put into scope are not added to the stack. There's both a stack of objects
>> and a hash mapping names to objects. When you "set" something you're adding
>> it to the hash table, not the value stack. To later address something in
>> this hash table you prefix it with #.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
>
>
>  


Attachment: user_201051.ezm (zipped)


Hi!

meanwhile I've found something interresting: My application is running on
Apache Tomcat. When I set the
"-Duser.language=en -Duser.region=US" for Tomcat, Struts doesn't use de as
default language anymore.


Titus



Pascal-53 wrote:
>
> Hm, ok. Could you post your resource bundle initialization/usage?
>
> Pascal
>
> On Thu, 23 Jul 2009 04:18:50 -0700 (PDT), Marsman <mars.man@(protected):
>> I've tried the browser language detection page and as I expected only the
>> language code "da-DK" was listed. I had already removed the languages
> de-DE
>> and en-US an the browser and addad da-Dk to test my Struts configuration.
>>
>> Titus
>>
>>
>>
>> Pascal-53 wrote:
>>>
>>> Are you sure your browser settings are correct? I bet it's on the client
>>> side, not a struts/config error.
>>>
>>> Try using some page to detect your language setting, like
>>> http://aruljohn.com/lang.php
>>>
>>> Hope this helps,
>>>
>>> Pascal
>>>
>>> On Thu, 23 Jul 2009 03:24:50 -0700 (PDT), Marsman <mars.man@(protected)>
>>> wrote:
>>>> Hi!
>>>
>>>
>
> ---------------------------------------------------------------------
> 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.


©2008 gg3721.com - Jax Systems, LLC, U.S.A.