You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas Doye <ni...@gmail.com> on 2007/06/24 23:40:30 UTC

FileUpload confusion

Hi all,

I've tried ripping off the file upload action from WebWork in Action
and from Struts 2.0.8's showcase.

Here are some things that are confusing me:

1. What are the correct entry points/methods for the Action? WWiA
suggests that we use execute(). The showcase example has upload() and
input(). Which is right?

2. For both, I always get an warning (by magic!) after uploading
rendered above the form, viz. 'Invalid field value for field
"upload".'  and in the tomcat log/console: SEVERE:
ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'upload' on 'class foo.Bar' ....

I can see the FileUploadInterceptor removing the uploaded file afterwards...

FYI: Struts 2.0.8 / Sun Java 6 / Tomcat 6.0.x / run from MyEclipse.

It's hinted at in https://issues.apache.org/struts/browse/WW-1884 that
this is something to do with validation (which I wasn't aware I was
using :-) ) and that it is fixed in Struts 2.0.8 / XWork 2.0.3 (both
of which I am using anyway).

Any hints/tips/pointers greatfully received,
nic
-- 
http://worldofnic.org

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