You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Anton Pussep (JIRA)" <ji...@apache.org> on 2007/11/19 11:55:34 UTC

[jira] Created: (WW-2330) cancatenate strings in the value attribute of the set tag

cancatenate strings in the value attribute of the set tag
---------------------------------------------------------

                 Key: WW-2330
                 URL: https://issues.apache.org/struts/browse/WW-2330
             Project: Struts 2
          Issue Type: Bug
          Components: Expression Language
    Affects Versions: 2.0.11
         Environment: Tested on Debian Linux testing with Tomcat 6.0.14 and JBoss 4.
            Reporter: Anton Pussep


There seems to be no intuitive way to concatenate strings in the value attribute of the set tag:

<s:set name="a" value="%{'/jsp/'+#parameters.file}" />

sets "a" to "/jsp/[Ljava.lang.String;@1bd2184", it also didn't help to enforce evaluation as a string:

<s:set name="a" value="%{'/jsp/'+#parameters.file.toString()}" />

Also in the Struts mailinglist no one could tell me, how to do that, even though I got an excellent reply:

http://www.nabble.com/forum/ViewPost.jtp?post=13825946&framed=y

I think there should be an intuitive way to do that, for instance it works in the text tag:
<s:text name="/jsp/%{#parameters.file}" />

The same one of the following would be logical for the set tag:
<s:set name="a" value="%{'/jsp/' + #parameters.file}" />
<s:set name="a" value="%{'/jsp/'#parameters.file}" />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2330) unable to concatenate strings in the value attribute of the set tag

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-2330.
---------------------------------

    Resolution: Not A Problem

This is not a problem. #parameters.file is an array as it was pointed out in the comments. 

http://struts.apache.org/2.x/docs/why-doesnt-the-if-tag-evaluate-params-properly.html


> unable to concatenate strings in the value attribute of the set tag
> -------------------------------------------------------------------
>
>                 Key: WW-2330
>                 URL: https://issues.apache.org/struts/browse/WW-2330
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.0.11
>         Environment: Tested on Debian Linux testing with Tomcat 6.0.14 and JBoss 4.
>            Reporter: Anton Pussep
>             Fix For: Future
>
>
> There seems to be no intuitive way to concatenate strings in the value attribute of the set tag:
> <s:set name="a" value="%{'/jsp/'+#parameters.file}" />
> sets "a" to "/jsp/[Ljava.lang.String;@1bd2184", it also didn't help to enforce evaluation as a string:
> <s:set name="a" value="%{'/jsp/'+#parameters.file.toString()}" />
> Also in the Struts mailinglist no one could tell me, how to do that, even though I got an excellent reply:
> http://www.nabble.com/forum/ViewPost.jtp?post=13825946&framed=y
> I think there should be an intuitive way to do that, for instance it works in the text tag:
> <s:text name="/jsp/%{#parameters.file}" />
> The same one of the following would be logical for the set tag:
> <s:set name="a" value="%{'/jsp/' + #parameters.file}" />
> <s:set name="a" value="%{'/jsp/'#parameters.file}" />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2330) unable to concatenate strings in the value attribute of the set tag

Posted by "Ralf Fischer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45490#action_45490 ] 

Ralf Fischer commented on WW-2330:
----------------------------------

Isn't this "[L" the prefix which the toString() method of an array prepends?

If parameters.file is a String array, this expression should work: 

<s:set name="a" value="%{'/jsp/'+#parameters.file[0]}" /> 


> unable to concatenate strings in the value attribute of the set tag
> -------------------------------------------------------------------
>
>                 Key: WW-2330
>                 URL: https://issues.apache.org/struts/browse/WW-2330
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.0.11
>         Environment: Tested on Debian Linux testing with Tomcat 6.0.14 and JBoss 4.
>            Reporter: Anton Pussep
>             Fix For: Future
>
>
> There seems to be no intuitive way to concatenate strings in the value attribute of the set tag:
> <s:set name="a" value="%{'/jsp/'+#parameters.file}" />
> sets "a" to "/jsp/[Ljava.lang.String;@1bd2184", it also didn't help to enforce evaluation as a string:
> <s:set name="a" value="%{'/jsp/'+#parameters.file.toString()}" />
> Also in the Struts mailinglist no one could tell me, how to do that, even though I got an excellent reply:
> http://www.nabble.com/forum/ViewPost.jtp?post=13825946&framed=y
> I think there should be an intuitive way to do that, for instance it works in the text tag:
> <s:text name="/jsp/%{#parameters.file}" />
> The same one of the following would be logical for the set tag:
> <s:set name="a" value="%{'/jsp/' + #parameters.file}" />
> <s:set name="a" value="%{'/jsp/'#parameters.file}" />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2330) unable to concatenate strings in the value attribute of the set tag

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2330:
-----------------------------

    Summary: unable to concatenate strings in the value attribute of the set tag  (was: cancatenate strings in the value attribute of the set tag)

> unable to concatenate strings in the value attribute of the set tag
> -------------------------------------------------------------------
>
>                 Key: WW-2330
>                 URL: https://issues.apache.org/struts/browse/WW-2330
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.0.11
>         Environment: Tested on Debian Linux testing with Tomcat 6.0.14 and JBoss 4.
>            Reporter: Anton Pussep
>             Fix For: Future
>
>
> There seems to be no intuitive way to concatenate strings in the value attribute of the set tag:
> <s:set name="a" value="%{'/jsp/'+#parameters.file}" />
> sets "a" to "/jsp/[Ljava.lang.String;@1bd2184", it also didn't help to enforce evaluation as a string:
> <s:set name="a" value="%{'/jsp/'+#parameters.file.toString()}" />
> Also in the Struts mailinglist no one could tell me, how to do that, even though I got an excellent reply:
> http://www.nabble.com/forum/ViewPost.jtp?post=13825946&framed=y
> I think there should be an intuitive way to do that, for instance it works in the text tag:
> <s:text name="/jsp/%{#parameters.file}" />
> The same one of the following would be logical for the set tag:
> <s:set name="a" value="%{'/jsp/' + #parameters.file}" />
> <s:set name="a" value="%{'/jsp/'#parameters.file}" />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.