struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlm...@gmail.com
Subject Re: Reference to static field as parameter value in Struts2
Date Tue, 10 Jul 2012 10:56:55 GMT
What would be the average way? In this case there is no action to read(well, there is, but
it could be any action), since this result is only called from an interceptor.
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: John Keats <keats144@gmail.com>
Date: Tue, 10 Jul 2012 15:55:46 
To: Struts Users Mailing List<user@struts.apache.org>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
Subject: Re: Reference to static field as parameter value in Struts2

I am surprised this worked for you. But can't the average way execute a
static method?

On Sun, Jul 8, 2012 at 3:07 AM, JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>wrote:

> Well, after all it works just fine, I don't know what I was doing wrong. I
> needed something more complicate than just a static field, I needed to
> execute a static method, and then a getter from the returned object. The
> final solution was:
>
> <param name="headers.Location">${@zzz.yyy.xxx.Myclass@getInstance
> ().getValue()}</param>
>
>
> 2012/7/7 JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>
>
> Hi,
> >  Is it possible to have a result as follows:
> >
> >             <result name="defaultLocaleLoginScreen" type="httpheader">
> >                 <param name="status">301</param>
> >                 <param name="headers.Location">${@
> > zzz.yyy.xxx.MyClass@MyValue}</param>
> >         </result>
> >
> > Where MyValue is a static field of the class MyClass? I haven't been able
> > to get it to work. Any ideas?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Mime
View raw message