Re: concatenate Strings in tag attributes

2007-11-20 Thread Gary Affonso
Anton Pussep wrote: value="%{'/jsp/'+#parameters.file[0]}" I thought I tried that one out already, but apparently I remembered wrong, since it really works, which is great! Anyway, for my part this is very inconvenient. Also I don't know a way to pass an array to request parameters. Thus IMH

Re: concatenate Strings in tag attributes

2007-11-19 Thread Anton Pussep
> value="%{'/jsp/'+#parameters.file[0]}" I thought I tried that one out already, but apparently I remembered wrong, since it really works, which is great! Anyway, for my part this is very inconvenient. Also I don't know a way to pass an array to request parameters. Thus IMHO there should be a m

Re: concatenate Strings in tag attributes

2007-11-19 Thread Dave Newton
The issue seems to be that OGNL's expression parsing does different things at different times. > > > prints out "/jsp/test.jsp", whereas > > > > prints out "/jsp/[Ljava.lang.String;@1bd2184", This is, perhaps, related to the thread from a week or two ago, the "Re: OGNL s

Re: concatenate Strings in tag attributes

2007-11-19 Thread Gary Affonso
Looks to me like the return value of parameters.file is *not* a String. It's a an *array* of strings. And a toString() on an Array of strings looks exactly like what you're seeing: [Ljava.lang.String;... (the prefixed "[" is the clue that it's a string *array*). If the "file" parameter ha

Re: concatenate Strings in tag attributes

2007-11-18 Thread Anton Pussep
First of all thanks a lot for the good and well structured reply. I tried but the result is still the same. I also wrote an own static method that prints out the result and it is also "/jsp/[Ljava.lang.String;@1bd2184". However, a static concatenation method will most probably work, but I hope i

Re: concatenate Strings in tag attributes

2007-11-18 Thread Jeromy Evans
I don't have the full solution, but lets think about this for a moment instead of using trial-and-error... By default, every struts2 tag either expects the attribute to be a string literal, an OGNL expression evaluated as a string or an OGNL expression evaluated as an object. We don't really

Re: concatenate Strings in tag attributes

2007-11-18 Thread Anton Pussep
Results in the same as which means that a remains unset. Same for: Best, Anton Saul Qunming Yuan wrote: > Hi > > You may want to try the following to set variable "a": > > > > > > just a thought. > > Saul > > Anton Pussep wrote: >> Hello, >> >> I am trying to concatenate strin

Re: concatenate Strings in tag attributes

2007-11-18 Thread Saul Qunming Yuan
Hi You may want to try the following to set variable "a": just a thought. Saul Anton Pussep wrote: Hello, I am trying to concatenate strings in tag attributes and get results that I don't understand: prints out "/jsp/test.jsp", whereas prints out "/jsp/[Ljava.lang.String;@1bd21