struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4239) Using ParameterAware with FileUploadInterceptor leads to ClassCastException
Date Fri, 08 Nov 2013 06:28:19 GMT

    [ https://issues.apache.org/jira/browse/WW-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13817041#comment-13817041
] 

Lukasz Lenart commented on WW-4239:
-----------------------------------

The question is if it is the right solution replace String[] with Object - web parameters
are always passed as array of strings even if it is a file or any other binary data - it will
be encoded to string and passed in the array.

> Using ParameterAware with FileUploadInterceptor leads to ClassCastException
> ---------------------------------------------------------------------------
>
>                 Key: WW-4239
>                 URL: https://issues.apache.org/jira/browse/WW-4239
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.15.1
>            Reporter: Ilya
>             Fix For: 2.3.17
>
>
> Ljava.io.File; cannot be cast to [Ljava.lang.String;
> ---------
> According to ParameterAware I should have method
> {code}
> public void setParameters(Map<String, String[]> parameters);
> {code}
> But I also have _File_ field and FileUploadInterceptor  sets file there.
> So, I am getting File[] instead of String[].



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message