Heading off at a slight tangent, is it possible to use the constant values in
action configurations within the struts XML?
I have long thought it a code smell that I have magic strings in my XML
configuration that get repeated in my code. If I could handle those by
reference to a single point in
Simplicity: it's just an @Inject.
On Mon, Oct 25, 2010 at 2:55 AM, SudhirJava wrote:
>
> Struts Constants.
> I can define in web.xml and get the value in Action class too.
> Then what is the use of Struts Constants?
>
>
> ~SK
>
>
> Maurizio Cucchiara wrote:
>>
>> I'm not sure what you mean.
>> Wh
Struts Constants.
I can define in web.xml and get the value in Action class too.
Then what is the use of Struts Constants?
~SK
Maurizio Cucchiara wrote:
>
> I'm not sure what you mean.
> What's the benefit of inversion of control? or struts constant?
>
> 2010/10/25 SudhirJava :
>>
>> Can any
I'm not sure what you mean.
What's the benefit of inversion of control? or struts constant?
2010/10/25 SudhirJava :
>
> Can anybody please tell me
> What is the Benefit of this ?
> I can define it in web.xml can retrieve it.
>
> What is the main purpose of this??
>
>
> ~SK
>
>
> SudhirJava wrote:
Can anybody please tell me
What is the Benefit of this ?
I can define it in web.xml can retrieve it.
What is the main purpose of this??
~SK
SudhirJava wrote:
>
> Thanks.
> That works...
>
> I think it should be value instead of name
> i.e.
> @Inject(value="myConstant")
> instead of
> @Inje
Thanks.
That works...
I think it should be value instead of name
i.e.
@Inject(value="myConstant")
instead of
@Inject(name="myConstant")
~SK
rahulmohan wrote:
>
> Just put an @Inject(name="MYCONSTANTVARIABLE") annotation on the setter in
> action class.
>
> - RM
>
>
>
> From:
> SudhirJa
Just put an @Inject(name="MYCONSTANTVARIABLE") annotation on the setter in
action class.
- RM
From:
SudhirJava
To:
user@struts.apache.org
Date:
21-10-2010 17:58
Subject:
How to get the value of Constants defined in struts.xml
I am sorry, if this thread is repeated.
Please tell tell me h
Get it where? Normally you'd just use the @Inject annotation, IIRC.
Dave
On Thu, Oct 21, 2010 at 8:27 AM, SudhirJava wrote:
>
> I am sorry, if this thread is repeated.
>
> Please tell tell me how get the value of Constants defined in struts.xml.
> Is it possible to get the value of "MYCONSTANTVA
8 matches
Mail list logo