Author Login
Post Reply
user Digest 15 Apr 2008 23:58:48 -0000 Issue 7980
Topics (messages 185445 through 185464):
Re: Is there such a thing as flash in S2?
185445 by: Ian Roughley
185448 by: Brad A Cupit
Re: [S2] Spring: Interceptors, prototype or singleton?
185446 by: Randy Burgess
185457 by: Martin Gainty
Re: Struts 2 + AjaxTags + DisplayTag
185447 by: Randy Burgess
Loading Resource bundles dynamically for users
185449 by: Karunamoorthy K
Re: [OT] Scheduled DB clean up service with Spring
185450 by: Gabriel Belingueres
185455 by: Peter Theissen
185463 by: Haroon Rafique
185464 by: Gabriel Belingueres
Having trouble pre-populating a checkboxlist
185451 by: tristan_colson
Validation vetoing Action invocation
185452 by: stanlick
185453 by: Musachy Barroso
Re: Clean some characters in request parameters
185454 by: Laurie Harper
185456 by: hernan gonzalez
Problem with Select tag
185458 by: Milan Milanovic
<s:property with dynamic values
185459 by: JRD
185460 by: Dave Newton
Struts2 Portlet with custom interceptors
185461 by: Parker Grimes
S2GWTDemo
185462 by: Frans Thamura
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_185445.ezm (zipped)There is also a flash result type / interceptor in webwork - very easy
(<2 min) to convert to s2.
/Ian
Don Brown wrote:
> There is the Struts 2 Scope Plugin [1], which does flash scope and a
> lot more. Also, the message store interceptor, available in core
> out-of-the-box, will persist action and error messages across a
> redirect in a "flash" scope, which is very handy for registering
> validation errors on a POST but having the response redirect the user
> to a GET.
>
> Don
>
> [1] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
>
> On Tue, Apr 15, 2008 at 6:48 PM, Alex Shneyderman
> <a.shneyderman@(protected):
>
>> Flash scope is fairly common nowdays (for displaying messages) I
>> wonder if S2 2.011, has anything similar?
>>
>> thanks,
>> Alex.
>>
>> ---------------------------------------------------------------------
>> 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_185448.ezm (zipped)link to the webwork Flash result Ian mentioned:
http://wiki.opensymphony.com/display/WW/Flash+Result
Brad Cupit
Louisiana State University - UIS
-----Original Message-----
From: Ian Roughley [mailto:ian@(protected)]
Sent: Tuesday, April 15, 2008 8:39 AM
To: Struts Users Mailing List
Subject: Re: Is there such a thing as flash in S2?
There is also a flash result type / interceptor in webwork - very easy
(<2 min) to convert to s2.
/Ian
Don Brown wrote:
> There is the Struts 2 Scope Plugin [1], which does flash scope and a
> lot more. Also, the message store interceptor, available in core
> out-of-the-box, will persist action and error messages across a
> redirect in a "flash" scope, which is very handy for registering
> validation errors on a POST but having the response redirect the user
> to a GET.
>
> Don
>
> [1] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
>
> On Tue, Apr 15, 2008 at 6:48 PM, Alex Shneyderman
> <a.shneyderman@(protected):
>
>> Flash scope is fairly common nowdays (for displaying messages) I
>> wonder if S2 2.011, has anything similar?
>>
>> thanks,
>> Alex.
>>
>>
---------------------------------------------------------------------
>> 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)
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_185446.ezm (zipped)Just about every single S2 action I have ever created uses Spring to inject
a service object of some sort into the action. I use Spring for
transactions, SLSB's, MDB's, JDBC, Hibernate, you name it.
Ganfab asked about injecting a new instance of an object into a custom
interceptor on every action call and my thinking was that Spring had only
constructor or setter injection and that interceptors were always
singletons, so the injected bean would always be a singleton. Well I just
found in Spring 2.5 they have lookup method injection which can be used to
create a new instance of an object from the Spring bean factory and inject
them into a Singleton. Using this you could inject new instances and declare
your interceptor in a package and not have to declare it for every action
needing this type of interceptor. See 3.3.7.1.
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#bea
ns-factory-method-injection
I hope I'm being clear about what I mean. :)
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Martin Gainty <mgainty@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Mon, 14 Apr 2008 21:50:15 -0400
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>
> Could you provide a scenario where one bean is injected into another?
>
> Thanks
> M-
> ----- Original Message -----
> From: "Randy Burgess" <RBurgess@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Monday, April 14, 2008 3:55 PM
> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>
>
>> So the interceptor would have to be declared at the action level in this
>> case then? If I have a spring bean named myBean that is default scope and
> I
>> inject another bean declared as a prototype into it, the injected bean
> will
>> still be a singleton since there will be only one instance of myBean.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: Don Brown <donald.brown@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Tue, 15 Apr 2008 01:12:49 +1000
>>> To: Struts Users Mailing List <user@(protected)>
>>> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
>>>
>>> To clarify, interceptors aren't technically singletons as each
>>> instance in an interceptor stack gets its own interceptor instance.
>>> However, for all requests using that stack, the same interceptor will
>>> be used. Therefore, you do need to be careful. For example, most
>>> interceptors take parameters that configure their use within the
>>> stack, like the "validation" interceptor that takes a list of excluded
>>> methods from validation. Interceptors can be configured at the stack
>>> level or at the action level. If at the action level, you will get a
>>> unique interceptor instance for that action.
>>>
>>> If you want Spring to construct your interceptor, I recommend the
>>> prototype scope, so that Struts gets a new instance of the interceptor
>>> as expected.
>>>
>>> Don
>>>
>>> On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected)>
> wrote:
>>>> Interceptors are Singletons according to the documentation. If it were
> me I
>>>> would come up with another method besides Spring for changing object
>>>> properties.
>>>>
>>>> Regards,
>>>> Randy Burgess
>>>> Sr. Web Applications Developer
>>>> Nuvox Communications
>>>>
>>>>
>>>>
>>>>> From: GF <ganfab@(protected)>
>>>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>>>> Date: Mon, 14 Apr 2008 14:51:25 +0200
>>>>> To: Struts Users ML <user@(protected)>
>>>>> Subject: [S2] Spring: Interceptors, prototype or singleton?
>>>>
>>>>
>>>>>
>>>>> In a guide I found on the web, the interceptor was defined as
> singleton in
>>>>> the Spring's ApplicationContext.
>>>>>
>>>>> If I need to use "changeable" object properties, I need to have it as
>>>>> Prototype, otherwise different requests will result in a object
> property
>>>>> overwriting.
>>>>> Is there any issues about defining an interceptor as Prototype, or is
> it ok?
>>>>>
>>>>> Thanks
>>>>>
>>>>> GF
>>>>
>>>>
>>>>
>>>> This email and any attachments ("Message") may contain legally
> privileged
>>>> and/or confidential information. If you are not the addressee, or if
> this
>>>> Message has been addressed to you in error, you are not authorized to
> read,
>>>> copy, or distribute it, and we ask that you please delete it (including
> all
>>>> copies) and notify the sender by return email. Delivery of this
> Message to
>>>> any person other than the intended recipient(s) shall not be deemed a
> waiver
>>>> of confidentiality and/or a privilege.
>>>>
>>>>
>>>> This email and any attachments ("Message") may contain legally
> privileged
>>>> and/or confidential information. If you are not the addressee, or if
> this
>>>> Message has been addressed to you in error, you are not authorized to
> read,
>>>> copy, or distribute it, and we ask that you please delete it (including
> all
>>>> copies) and notify the sender by return email. Delivery of this
> Message to
>>>> any person other than the intended recipient(s) shall not be deemed a
> waiver
>>>> of confidentiality and/or a privilege.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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)
>>>
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> 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)
>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_185457.ezm (zipped)Yes very clear thank you
so the default assignment of scope=singleton happens under these scenarios:
1)bean creation defaulting to singleton as in ApplicationContext
2)beanFactory supports registerSingleton
then a singleton bean can be set to lazy-initialize (that is not be
pre-instantiated).
For all other situations the default of prototype is implied
This statement about Method Injection is extremely problematic woth regards
to singletons
For most application scenarios, the majority of the beans in the container
will be singletons. When a singleton bean needs to collaborate with another
singleton bean, or a non-singleton bean needs to collaborate with another
non-singleton bean, the typical and common approach of handling this
dependency by defining one bean to be a property of the other is quite
adequate. There is a problem when the bean lifecycles are different.
Consider a singleton bean A which needs to use a non-singleton (prototype)
bean B, perhaps on each method invocation on A. The container will only
create the singleton bean A once, and thus only get the opportunity to set
the properties once. There is no opportunity for the container to provide
bean A with a new instance of bean B every time one is needed.
So if prototype bean B changes A has no clue..
I think I'll stay with the scope="prototype/singleton" in the declarator..
Thanks,
Martin
----- Original Message -----
From: "Randy Burgess" <RBurgess@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, April 15, 2008 9:51 AM
Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
> Just about every single S2 action I have ever created uses Spring to
inject
> a service object of some sort into the action. I use Spring for
> transactions, SLSB's, MDB's, JDBC, Hibernate, you name it.
>
> Ganfab asked about injecting a new instance of an object into a custom
> interceptor on every action call and my thinking was that Spring had only
> constructor or setter injection and that interceptors were always
> singletons, so the injected bean would always be a singleton. Well I just
> found in Spring 2.5 they have lookup method injection which can be used to
> create a new instance of an object from the Spring bean factory and inject
> them into a Singleton. Using this you could inject new instances and
declare
> your interceptor in a package and not have to declare it for every action
> needing this type of interceptor. See 3.3.7.1.
>
>
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#bea
> ns-factory-method-injection
>
> I hope I'm being clear about what I mean. :)
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Martin Gainty <mgainty@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Mon, 14 Apr 2008 21:50:15 -0400
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
> >
> > Could you provide a scenario where one bean is injected into another?
> >
> > Thanks
> > M-
> > ----- Original Message -----
> > From: "Randy Burgess" <RBurgess@(protected)>
> > To: "Struts Users Mailing List" <user@(protected)>
> > Sent: Monday, April 14, 2008 3:55 PM
> > Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
> >
> >
> >> So the interceptor would have to be declared at the action level in
this
> >> case then? If I have a spring bean named myBean that is default scope
and
> > I
> >> inject another bean declared as a prototype into it, the injected bean
> > will
> >> still be a singleton since there will be only one instance of myBean.
> >>
> >> Regards,
> >> Randy Burgess
> >> Sr. Web Applications Developer
> >> Nuvox Communications
> >>
> >>
> >>
> >>> From: Don Brown <donald.brown@(protected)>
> >>> Reply-To: Struts Users Mailing List <user@(protected)>
> >>> Date: Tue, 15 Apr 2008 01:12:49 +1000
> >>> To: Struts Users Mailing List <user@(protected)>
> >>> Subject: Re: [S2] Spring: Interceptors, prototype or singleton?
> >>>
> >>> To clarify, interceptors aren't technically singletons as each
> >>> instance in an interceptor stack gets its own interceptor instance.
> >>> However, for all requests using that stack, the same interceptor will
> >>> be used. Therefore, you do need to be careful. For example, most
> >>> interceptors take parameters that configure their use within the
> >>> stack, like the "validation" interceptor that takes a list of excluded
> >>> methods from validation. Interceptors can be configured at the stack
> >>> level or at the action level. If at the action level, you will get a
> >>> unique interceptor instance for that action.
> >>>
> >>> If you want Spring to construct your interceptor, I recommend the
> >>> prototype scope, so that Struts gets a new instance of the interceptor
> >>> as expected.
> >>>
> >>> Don
> >>>
> >>> On Tue, Apr 15, 2008 at 12:48 AM, Randy Burgess <RBurgess@(protected)>
> > wrote:
> >>>> Interceptors are Singletons according to the documentation. If it
were
> > me I
> >>>> would come up with another method besides Spring for changing object
> >>>> properties.
> >>>>
> >>>> Regards,
> >>>> Randy Burgess
> >>>> Sr. Web Applications Developer
> >>>> Nuvox Communications
> >>>>
> >>>>
> >>>>
> >>>>> From: GF <ganfab@(protected)>
> >>>>> Reply-To: Struts Users Mailing List <user@(protected)>
> >>>>> Date: Mon, 14 Apr 2008 14:51:25 +0200
> >>>>> To: Struts Users ML <user@(protected)>
> >>>>> Subject: [S2] Spring: Interceptors, prototype or singleton?
> >>>>
> >>>>
> >>>>>
> >>>>> In a guide I found on the web, the interceptor was defined as
> > singleton in
> >>>>> the Spring's ApplicationContext.
> >>>>>
> >>>>> If I need to use "changeable" object properties, I need to have it
as
> >>>>> Prototype, otherwise different requests will result in a object
> > property
> >>>>> overwriting.
> >>>>> Is there any issues about defining an interceptor as Prototype, or
is
> > it ok?
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>> GF
> >>>>
> >>>>
> >>>>
> >>>> This email and any attachments ("Message") may contain legally
> > privileged
> >>>> and/or confidential information. If you are not the addressee, or if
> > this
> >>>> Message has been addressed to you in error, you are not authorized to
> > read,
> >>>> copy, or distribute it, and we ask that you please delete it
(including
> > all
> >>>> copies) and notify the sender by return email. Delivery of this
> > Message to
> >>>> any person other than the intended recipient(s) shall not be deemed a
> > waiver
> >>>> of confidentiality and/or a privilege.
> >>>>
> >>>>
> >>>> This email and any attachments ("Message") may contain legally
> > privileged
> >>>> and/or confidential information. If you are not the addressee, or if
> > this
> >>>> Message has been addressed to you in error, you are not authorized to
> > read,
> >>>> copy, or distribute it, and we ask that you please delete it
(including
> > all
> >>>> copies) and notify the sender by return email. Delivery of this
> > Message to
> >>>> any person other than the intended recipient(s) shall not be deemed a
> > waiver
> >>>> of confidentiality and/or a privilege.
> >>>>
>
>>> ---------------------------------------------------------------------
> >>>> 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)
> >>>
> >>
> >>
> >>
> >> This email and any attachments ("Message") may contain legally
privileged
> > and/or confidential information. If you are not the addressee, or if
this
> > Message has been addressed to you in error, you are not authorized to
read,
> > copy, or distribute it, and we ask that you please delete it (including
all
> > copies) and notify the sender by return email. Delivery of this Message
to
> > any person other than the intended recipient(s) shall not be deemed a
waiver
> > of confidentiality and/or a privilege.
> >>
> >>
> >> This email and any attachments ("Message") may contain legally
privileged
> > and/or confidential information. If you are not the addressee, or if
this
> > Message has been addressed to you in error, you are not authorized to
read,
> > copy, or distribute it, and we ask that you please delete it (including
all
> > copies) and notify the sender by return email. Delivery of this Message
to
> > any person other than the intended recipient(s) shall not be deemed a
waiver
> > of confidentiality and/or a privilege.
> >>
> >> ---------------------------------------------------------------------
> >> 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)
> >
>
>
>
> This email and any attachments ("Message") may contain legally privileged
and/or confidential information. If you are not the addressee, or if this
Message has been addressed to you in error, you are not authorized to read,
copy, or distribute it, and we ask that you please delete it (including all
copies) and notify the sender by return email. Delivery of this Message to
any person other than the intended recipient(s) shall not be deemed a waiver
of confidentiality and/or a privilege.
>
>
> This email and any attachments ("Message") may contain legally privileged
and/or confidential information. If you are not the addressee, or if this
Message has been addressed to you in error, you are not authorized to read,
copy, or distribute it, and we ask that you please delete it (including all
copies) and notify the sender by return email. Delivery of this Message to
any person other than the intended recipient(s) shall not be deemed a waiver
of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185447.ezm (zipped)Well your requestURI is not set so the URL is set to the current JSP and not
the action. I have never had any success leaving requestURI blank with
DisplayTag on S1 or S2. I always set it to the name of an action.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Márcio Gurgel <marcio.rga@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 15 Apr 2008 01:18:34 -0300
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: Struts 2 + AjaxTags + DisplayTag
>
> Matt, tanks for your help. But I need to persist with displayTags /:
>
> I guess that there's some kind of validation inside struts 2 that doesnt
> allow the correct work of ajaxtags..
> Just take a look at my generated url from displaytag pagination.
>
> http://localhost:8080/SGVDBA/view/usuario/UsuPesquisaResultados.jsp?
> currentUsu.eMail=¤tUsu.chv=¤tUsu.dtGvr=&struts.enableJSONValidatio
> n=true
> &buttonPesquisar=Pesquisar&dojo.currentUsu.dtGvr=&d-49489-p=2
>
>
> Tanks all!
>
> 2008/4/14, matt.payne <matthew.b.payne@(protected)>:
>>
>>
>> You could try struts2 + jquery + jgrid
>> (http://trirand.com/jqgrid/jqgrid.html)
>> If you need ajax, you need something that returns an json or xml response
>> (insert you velocity, freemarker, json result, jsp result here).
>>
>> Matt
>>
>>
>>
>> Márcio Gurgel wrote:
>>>
>>> Hi all!
>>>
>>> Since this morning I'm having troubles to configure ajaxTags in my
>>> project.
>>> I followed the steps from ajaxTags web site, I also saw the ajaxTags
>> show
>>> case wich contains a example of display:table.
>>> But doen't work...
>>>
>>> Is there some kind os special configuration for struts 2?
>>> My displayTable is inside a <sx:tabbedPanel><sx:div>
>>>
>>> I also tried to use: useSelectedTabCookie="useSelectedTabCookie" to
>> select
>>> the correct tab when my displayTable pagination submits the page.
>>> In this case, the content of the first tab doesn't appear.
>>>
>>> Regards.
>>>
>>> Márcio Gurgel
>>>
>>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-2-%2B-AjaxTags-%2B-DisplayTag-tp16670438p1668945
>> 8.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)
>>
>>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_185449.ezm (zipped)Hi,
I am planning to use struts 2. But in my application , I have to load
different resouce bundle for different group of users.
For Instance,
User A, Belongs to Group A logs into the application, different set of
labels need to be displayed.
User B, Belongs to Group B logs into the application, different set of
labels need to be displayed.
Is this feature available in struts2? Is it possible to extend struts 2
to implement this feature?
I could not find enough material in the net. I have gone through document
and partialy tag libraries. Struts 2 uses valuestack for bundles. It is
registered in configProvider class. But I am not when this method is
invoked.
Thanks.
Cheers,
Karuna
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

Attachment:
user_185450.ezm (zipped)INF/applicationContext.xml]: problem with class file or dependent
class; nested exception is
java.lang.NoClassDefFoundError:
org/quartz/SimpleTrigger
You missed some quartz jar file.
2008/4/15, Peter Theissen <peter.theissen@(protected)>:
> Hi,
>
> back again with my problem. The root cause is:
> >>>
> SCHWERWIEGEND: Exception sending context initialized event to listener
> instance of class
>
org.springframework.web.context.ContextLoaderListener>
org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'personService': Injection of persistence
> methods failed; nested exception is
>
org.springframework.beans.factory.CannotLoadBeanClassException:
> Error loading class
> [
org.springframework.scheduling.quartz.SimpleTriggerBean]
> for bean with name 'simpleTrigger' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: problem with class file
> or dependent class; nested exception is
java.lang.NoClassDefFoundError:
> org/quartz/SimpleTrigger
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues (
PersistenceAnnotationBeanPostProcessor.java:323)
> at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (
AbstractAutowireCapableBeanFactory.java:966)
> at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (
AbstractAutowireCapableBeanFactory.java:462)
> at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
> at
java.security.AccessController.doPrivileged(Native
> Method)
> at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (
AbstractAutowireCapableBeanFactory.java:375)
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
> at
>
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (
DefaultSingletonBeanRegistry.java:170)
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (
AbstractBeanFactory.java:260)
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:184)
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:163)
> at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (
DefaultListableBeanFactory.java:430)
> at
>
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (
AbstractApplicationContext.java:729)
> at
>
org.springframework.context.support.AbstractApplicationContext.refresh (
AbstractApplicationContext.java:381)
> at
>
org.springframework.web.context.ContextLoader.createWebApplicationContext (
ContextLoader.java:254)
> at
>
org.springframework.web.context.ContextLoader.initWebApplicationContext (
ContextLoader.java:198)
> at
>
org.springframework.web.context.ContextLoaderListener.contextInitialized (
ContextLoaderListener.java:45)
> at
>
org.apache.catalina.core.StandardContext.listenerStart (
StandardContext.java:3843)
> at
>
org.apache.catalina.core.StandardContext.start (
StandardContext.java:4350)
> at
>
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
> at
>
org.apache.catalina.core.StandardHost.start (
StandardHost.java:719)
> at
>
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
> at
>
org.apache.catalina.core.StandardEngine.start (
StandardEngine.java:443)
> at
>
org.apache.catalina.core.StandardService.start (
StandardService.java:516)
> at
>
org.apache.catalina.core.StandardServer.start (
StandardServer.java:710)
> at
>
org.apache.catalina.startup.Catalina.start (
Catalina.java:578)
> at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at
java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.apache.catalina.startup.Bootstrap.start (
Bootstrap.java:288)
> at
>
org.apache.catalina.startup.Bootstrap.main (
Bootstrap.java:413)
> Caused by:
>
org.springframework.beans.factory.CannotLoadBeanClassException:
> Error loading class
> [
org.springframework.scheduling.quartz.SimpleTriggerBean]
> for bean with name 'simpleTrigger' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: problem with class file
> or dependent class; nested exception is
java.lang.NoClassDefFoundError:
> org/quartz/SimpleTrigger
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (
AbstractBeanFactory.java:1140)
> at
>
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType (
AbstractAutowireCapableBeanFactory.java:514)
> at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType (
DefaultListableBeanFactory.java:222)
> at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType (
DefaultListableBeanFactory.java:304)
> at
>
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType (
DefaultListableBeanFactory.java:298)
> at
>
org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors (
BeanFactoryUtils.java:224)
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory (
PersistenceAnnotationBeanPostProcessor.java:501)
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory (
PersistenceAnnotationBeanPostProcessor.java:471)
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:596)
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:567)
> at
>
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:193)
> at
>
org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods (
InjectionMetadata.java:116)
> at
>
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues (
PersistenceAnnotationBeanPostProcessor.java:320)
> ... 31 more
> Caused by:
java.lang.NoClassDefFoundError: org/quartz/SimpleTrigger
> at
java.lang.ClassLoader.defineClass1(Native Method)
> at
java.lang.ClassLoader.defineClass(Unknown Source)
> at
java.security.SecureClassLoader.defineClass(Unknown
> Source)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal (
WebappClassLoader.java:1819)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClass (
WebappClassLoader.java:872)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1327)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1206)
> at
>
org.springframework.util.ClassUtils.forName (
ClassUtils.java:230)
> at
>
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass (
AbstractBeanDefinition.java:381)
> at
>
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (
AbstractBeanFactory.java:1134)
> ... 43 more
> Caused by:
java.lang.ClassNotFoundException:
>
org.quartz.SimpleTrigger> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1360)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1206)
> at
java.lang.ClassLoader.loadClassInternal(Unknown
> Source)
> ... 53 more
> <<<
>
> Best regards
> Peter
>
> > Peter Theissen wrote:
> >
> > > Hi,
> > >
> > > the quartz scheduler from Spring seemed to be a quite nice solution for
> > > my DB clean up service. Thanks for that hint.
> > > Now I have a quite curios problem. If I, e.g. create a bean in
> > > applicationContext.xml as follows:
> > > >>>
> > > <bean id="simpleTrigger"
> class="
org.springframework.scheduling.quartz.SimpleTriggerBean">
> > >
> > > <!-- props are first commented out, since they are not important for
> this issue
> > > <property name="jobDetail" ref="jobInvokation"/>
> > > <property name="repeatInterval" value="10000"/>
> > > -->
> > >
> > > </bean>
> > > <<<
> > > I get a
>
org.springframework.beans.factory.BeanCreationException:
> > > nested exception is
>
org.springframework.beans.factory.CannotLoadBeanClassException:
> > > Error loading class
> [
org.springframework.scheduling.quartz.SimpleTriggerBean]
> > >
> > > But anyhow, if I import the class using:
> > > import
>
org.springframework.scheduling.quartz.SimpleTriggerBean;
> > > in some POJO in the project everything is fine.
> > >
> > > What am I missing?
> > >
> >
> > The 'root cause' section of the stack trace? That should tell you why
> Spring can't instantiate the bean.
> >
> > L.
> >
> >
> >
> ---------------------------------------------------------------------
> > 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_185455.ezm (zipped)Hi all,
sorry to continue with that OT thread, but its starting to get
really mad out here. But first of all, thanks for the hint that
the runtime classpath (rcp) has to be configured independently.
Well, I tried that but it ended up in a mess!
Of course, first thing I did was adding spring.jar to rcp of the
Apache... and I was awating the startup of my Webapp
joyfully. The joy ended quite soon with the following message
below (***)
Then I added servlet-api.jar to the rcp and another exception.
For every exception I got, I added a new (corresponding) jar
file. This ended up in a NullPointerEx. I guess thats because
the order of the jar files is also important.
However, to add those jars to the rcp, I added them in the
Run Dialog under Classpath, first I tried that under "User
Entries" and then under "Bootstrap Entries" in different permutations
and so on and so on. Happy trial and error.
But after some hours I have to admint: that doesnt make sense
any longer.
Can it be so difficult to use load class of the Spring Lib at runttime
and create it as a bean?
>>>
<bean id="simpleTrigger"
class="
org.springframework.scheduling.quartz.SimpleTriggerBean" />
<<<
If I omit this line, I have no problem to start the app at all!
In that case, my webApp works perfectly with default config:
Bootstrap Entries: JRE System Lib jre_1.6.0_5
User Entries: bootstrap.jar
How can I find out what the required jar files are to add to the rcp
except Spring.jar and in which order do I have to provide them.
Which of them have to be in "Bootstrap Entries" and which one in
"User Entries"?
Could anybody point me to the rigth direction, please?
I have lost the rigth path ;-)
Thanks and best regards
Peter
PS: sorry if my question is not formulated professional,
Im quite new to all that JavaWebFramework stuff.
>>> (***)
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at
java.lang.ClassLoader.defineClass1(Native Method)
at
java.lang.ClassLoader.defineClass(Unknown Source)
at
java.security.SecureClassLoader.defineClass(Unknown Source)
at
java.net.URLClassLoader.defineClass(Unknown Source)
at
java.net.URLClassLoader.access$000(Unknown Source)
at
java.net.URLClassLoader$1.run(Unknown Source)
at
java.security.AccessController.doPrivileged(Native Method)
at
java.net.URLClassLoader.findClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1275)
at
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1206)
at
org.apache.catalina.core.StandardContext.listenerStart (
StandardContext.java:3786)
at
org.apache.catalina.core.StandardContext.start (
StandardContext.java:4350)
at
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
at
org.apache.catalina.core.StandardHost.start (
StandardHost.java:719)
at
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start (
StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start (
StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start (
StandardServer.java:710)
at
org.apache.catalina.startup.Catalina.start (
Catalina.java:578)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.catalina.startup.Bootstrap.start (
Bootstrap.java:288)
at
org.apache.catalina.startup.Bootstrap.main (
Bootstrap.java:413)
Caused by:
java.lang.ClassNotFoundException:
javax.servlet.ServletContextListener at
java.net.URLClassLoader$1.run(Unknown Source)
at
java.security.AccessController.doPrivileged(Native Method)
at
java.net.URLClassLoader.findClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
at
java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 28 more
<<<

Attachment:
user_185463.ezm (zipped)On Today at 10:10pm, PT=>Peter Theissen <peter.theissen@(protected):
PT> [..snip..]
PT>
PT> Could anybody point me to the rigth direction, please?
PT> I have lost the rigth path ;-)
PT>
PT> Thanks and best regards
PT> Peter
PT>
Peter,
I am coming in a little cold into this thread, but I think when you
originally posted your message the stack trace complained about not
finding a class from the quartz package. This latest email, in my opinion,
describes you getting into a completely different tanget compared to
before. Revert your setup to what it was before and just try adding the
quartz jar to the classpath. Spring was trying to initialize but it got
stopped when it couldn't find the quartz jar. I would fix that problem
first.
Later,
--
Haroon Rafique
<haroon.rafique@(protected)>

Attachment:
user_185464.ezm (zipped)As a basic rule of thumb, you shall _never_ add the servlet-api.jar or
servlet.jar to the WEB-INF/lib folder (if that's what you are doing)
Consider reading this:
http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
If problems remains, consider then asking the right question to the
appropiate forum.
2008/4/15, Peter Theissen <peter.theissen@(protected)>:
> Hi all,
>
> sorry to continue with that OT thread, but its starting to get
> really mad out here. But first of all, thanks for the hint that
> the runtime classpath (rcp) has to be configured independently.
> Well, I tried that but it ended up in a mess!
>
> Of course, first thing I did was adding spring.jar to rcp of the
> Apache... and I was awating the startup of my Webapp
> joyfully. The joy ended quite soon with the following message
> below (***)
>
> Then I added servlet-api.jar to the rcp and another exception.
> For every exception I got, I added a new (corresponding) jar
> file. This ended up in a NullPointerEx. I guess thats because
> the order of the jar files is also important.
> However, to add those jars to the rcp, I added them in the
> Run Dialog under Classpath, first I tried that under "User
> Entries" and then under "Bootstrap Entries" in different permutations
> and so on and so on. Happy trial and error.
> But after some hours I have to admint: that doesnt make sense
> any longer.
>
> Can it be so difficult to use load class of the Spring Lib at runttime
> and create it as a bean?
> >>>
> <bean id="simpleTrigger"
> class="
org.springframework.scheduling.quartz.SimpleTriggerBean"
> />
> <<<
> If I omit this line, I have no problem to start the app at all!
> In that case, my webApp works perfectly with default config:
> Bootstrap Entries: JRE System Lib jre_1.6.0_5
> User Entries: bootstrap.jar
>
> How can I find out what the required jar files are to add to the rcp
> except Spring.jar and in which order do I have to provide them.
> Which of them have to be in "Bootstrap Entries" and which one in
> "User Entries"?
>
> Could anybody point me to the rigth direction, please?
> I have lost the rigth path ;-)
>
> Thanks and best regards
> Peter
>
> PS: sorry if my question is not formulated professional,
> Im quite new to all that JavaWebFramework stuff.
>
> >>> (***)
>
java.lang.NoClassDefFoundError:
> javax/servlet/ServletContextListener
> at
java.lang.ClassLoader.defineClass1(Native Method)
> at
java.lang.ClassLoader.defineClass(Unknown Source)
> at
java.security.SecureClassLoader.defineClass(Unknown
> Source)
> at
java.net.URLClassLoader.defineClass(Unknown Source)
> at
java.net.URLClassLoader.access$000(Unknown Source)
> at
java.net.URLClassLoader$1.run(Unknown Source)
> at
java.security.AccessController.doPrivileged(Native
> Method)
> at
java.net.URLClassLoader.findClass(Unknown Source)
> at
java.lang.ClassLoader.loadClass(Unknown Source)
> at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown
> Source)
> at
java.lang.ClassLoader.loadClass(Unknown Source)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1275)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass (
WebappClassLoader.java:1206)
> at
>
org.apache.catalina.core.StandardContext.listenerStart (
StandardContext.java:3786)
> at
>
org.apache.catalina.core.StandardContext.start (
StandardContext.java:4350)
> at
>
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
> at
>
org.apache.catalina.core.StandardHost.start (
StandardHost.java:719)
> at
>
org.apache.catalina.core.ContainerBase.start (
ContainerBase.java:1045)
> at
>
org.apache.catalina.core.StandardEngine.start (
StandardEngine.java:443)
> at
>
org.apache.catalina.core.StandardService.start (
StandardService.java:516)
> at
>
org.apache.catalina.core.StandardServer.start (
StandardServer.java:710)
> at
>
org.apache.catalina.startup.Catalina.start (
Catalina.java:578)
> at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> Source)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at
java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.apache.catalina.startup.Bootstrap.start (
Bootstrap.java:288)
> at
>
org.apache.catalina.startup.Bootstrap.main (
Bootstrap.java:413)
> Caused by:
java.lang.ClassNotFoundException:
>
javax.servlet.ServletContextListener> at
java.net.URLClassLoader$1.run(Unknown Source)
> at
java.security.AccessController.doPrivileged(Native
> Method)
> at
java.net.URLClassLoader.findClass(Unknown Source)
> at
java.lang.ClassLoader.loadClass(Unknown Source)
> at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown
> Source)
> at
java.lang.ClassLoader.loadClass(Unknown Source)
> at
java.lang.ClassLoader.loadClassInternal(Unknown
> Source)
> ... 28 more
>
> <<<
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185451.ezm (zipped)
I must be missing something obvious here, but I can't seem to get my
checkboxlist to prepopulate.
<s:checkboxlist name="platformsKeys" value="platformsKeys"
list="allPlatforms" listKey="value" listValue="label" />
platformsKeys is a array of integers and allPlatforms is a list of objects
with the key being an integer and the value being
a string.
Here is what the HTML looks like:
<input type="checkbox" name="platformsKeys" value="1" id="platformsKeys-1"/>
<label for="platformsKeys-1" class="checkboxLabel">Queries</label>
<input type="checkbox" name="platformsKeys" value="2" id="platformsKeys-2"/>
<label for="platformsKeys-2" class="checkboxLabel">Alerts</label>
When I use the form to create the values for platformsKeys, it works fine.
But when I return to the form with
platformsKeys having values in it, I would expect the checkboxes to be
checked where they match the values
that are found in platformsKeys.
But they aren't. What am I doing wrong?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185452.ezm (zipped)
I am facing an interesting situation and looking for feedback. I am really
enjoying minimal action configurations such as:
<action name="wizard_*" class="acme.action.wizard.Wizard" method="{1}">
<result>/pages/wizard/${nextPage}.jsp</result>
</action>
where my action class can decide which page to display next. This works
fine unless a validation fails, which short circuits the action call
altogether. I discovered the DefaultWorkflowInterceptor was checking for
errors using a call to validationAwareAction.hasErrors() and decided to
override the hasErrors() behavior in my base action class to return false.
This allows me to determine navigation in my action class independent of the
String return type and multiple result lookup code in the struts.xml
mappings. All of this and I continue to get appropriate validation
messages. What seems odd is that I would have to default the hasErrors()
behavior this way. Is there a switch or flag where I can configure the
framework to execute action always?
I realize the framework navigation logic is "wired" to use the symbolic
names as opposed to names in the action class itself. However, I feel like
you should be able to use both schemes without weird code in a base class.
Peace,
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185453.ezm (zipped)No, the workflow interceptor will check for errors and return 'input'
if there are any:
http://svn.opensymphony.com/fisheye/browse/~raw,r=1630/xwork/trunk/src/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
In your case, why don't you remove the workflow interceptor?
musachy
On Tue, Apr 15, 2008 at 6:24 PM, stanlick <stanlick@(protected):
>
> I am facing an interesting situation and looking for feedback. I am really
> enjoying minimal action configurations such as:
>
> <action name="wizard_*" class="acme.action.wizard.Wizard" method="{1}">
> <result>/pages/wizard/${nextPage}.jsp</result>
> </action>
>
> where my action class can decide which page to display next. This works
> fine unless a validation fails, which short circuits the action call
> altogether. I discovered the DefaultWorkflowInterceptor was checking for
> errors using a call to validationAwareAction.hasErrors() and decided to
> override the hasErrors() behavior in my base action class to return false.
> This allows me to determine navigation in my action class independent of the
> String return type and multiple result lookup code in the struts.xml
> mappings. All of this and I continue to get appropriate validation
> messages. What seems odd is that I would have to default the hasErrors()
> behavior this way. Is there a switch or flag where I can configure the
> framework to execute action always?
>
> I realize the framework navigation logic is "wired" to use the symbolic
> names as opposed to names in the action class itself. However, I feel like
> you should be able to use both schemes without weird code in a base class.
>
> Peace,
> Scott
>
>
> --
> View this message in context: http://www.nabble.com/Validation-vetoing-Action-invocation-tp16703623p16703623.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)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_185454.ezm (zipped)hernan gonzalez wrote:
> Assume I have a lot of html forms with text inputs, and I want to
> palce some restrictions for the set of allowed chars. Sort of a sanity
> check, at the charset level.
> For a concrete example, my storage (db) uses LATIN9 (iso-8859-15), and
> the user sometimes can enter the non-allowed acute-accent (instead of
> the intended-correct apostrophe). In this -and similar cases- I want
> to detect it (replacing it with the "good" character, or throwing an
> error). I wish to do it globally, not field by field... though not for
> the entire application, but for a set of actions.
> I was thinking of an interceptor that operates at the
> HttpServletRequest level, before the ParametersInterceptor is applied
> (I don't care if the http param corresponds to a String property), but
> this does not seem very straightforward , as the HttpServletRequest
> does not allow to manipulate the params.
> Any suggestion or pointer?
There's nothing in Struts that will take care of this directly. Ideally
your users should be able to enter whatever characters they want; I
would be looking at how to get the database layer to cooperate, instead
of imposing arbitrary input restrictions based on the current database
configuration. That said, here are some ideas to consider that might
help get this done:
- to simply validate input and reject any that is outside the target
character set, you could implement a custom validator;
- to transliterate the input (performing character conversions to force
the input into the target character set), you could implement a custom
converter
- to apply either strategy to *all* inputs for a particular action or
set of actions, you would want to use an interceptor. I would guess
you'd need to call actionInvocation.getActionContext().setParameters()
with your 'manipulated' request parameter data.
L.

Attachment:
user_185456.ezm (zipped)> There's nothing in Struts that will take care of this directly. Ideally
> your users should be able to enter whatever characters they want; I would be
> looking at how to get the database layer to cooperate, instead of imposing
> arbitrary input restrictions based on the current database configuration.
> That said, here are some ideas to consider that might help get this done:
>
> - to simply validate input and reject any that is outside the target
> character set, you could implement a custom validator;
>
> - to transliterate the input (performing character conversions to force the
> input into the target character set), you could implement a custom converter
>
> - to apply either strategy to *all* inputs for a particular action or set
> of actions, you would want to use an interceptor. I would guess you'd need
> to call actionInvocation.getActionContext().setParameters() with your
> 'manipulated' request parameter data.
>
Good answer. Thanks.
Hernán

Attachment:
user_185458.ezm (zipped)Hi,
I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It works perfectly, but
when I added namespace to the package in struts.xml, which is used in form where this select tag
is located, I get an error:
"tag 'select', field 'list', id 'roles', name 'user.roles': The requested list key 'allRoles' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unkown location]"
I should note that I've added this namespace to the form tag too, where select tag is located.
How can I solve this problem ? It seems when namespace is added to package, select's list attribute doesn't recognize correct value stack anymore.
___________________________
Thanks in advance, Milan Milanovic
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment:
user_185459.ezm (zipped)
Hi there,
I have an action/form that contains properties x, y, & z with values 1, 2, &
3. I have a .JSP where I want to write out the values of them dynamically.
<c:set var="currentProperty" value="x"/>
How do I write a <s:property value=""/> using currentProperty that would
result it showing my actions value (1).
If I were using runtime expressions I would write it like
<s:property value="${currentProperty}"/>
but that is verboten by the tld.
All help is appreciated,
Jonathan
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185460.ezm (zipped)--- JRD <danger_jon@(protected):
> I have a .JSP where I want to write out the values of them dynamically.
>
>
> <c:set var="currentProperty" value="x"/>
>
> How do I write a <s:property value=""/> using currentProperty that would
> result it showing my actions value (1).
>
> If I were using runtime expressions I would write it like
> <s:property value="${currentProperty}"/>
> but that is verboten by the tld.
Why wouldn't you just use ${x} (in a JSP 2.0+ container) or <s:property
value="x"/>?
If you're dead-set on using the "currentProperty" thing use
${currentProperty} or <s:property value="currentProperty"/>.
Or use <s:set name="currentProperty" value="x"/> with either the "bare" JSP
2.0+ notation or via <s:property value="#currentProperty"/>.
Dave

Attachment:
user_185461.ezm (zipped)
Attachment:
user_185462.ezm (zipped)hi there (esp Mus),
I am try-ing Struts2GWTPlugins Demo
and i got there is 2 project, 1 the client and the other is the web, both
under the src
i have succesfully make the web become the war.
and i see the other folder struts2gwtdemoclient, it is a GWT project
can u explain to me, how to compile the GWT project and deployed to
struts2gwtpluginweb
F