DNewfield wrote: > >> Matt Raible wrote: >> > I had problems with Struts 2 and File Upload in AppFuse 2. >> Upgrading >> > to commons-fileupload 1.1.1 and commons-io 1.1 fixed the problem. > Turns out that 2/3 of the 1.9.4 jars are not current: > > component in 1.9.4 current > ------------------------ ------------------------- ---------- > commons-beanutils.jar: 1.6 1.7 > commons-chain-1.1.jar: 1.1 up to date > commons-collections.jar: 3.1 3.2 > commons-dbcp.jar: 1.2.1 up to date > commons-digester.jar: "1.6" 1.8 > commons-fileupload.jar: 1.1 1.1.1 > commons-io.jar: 1.2 1.3 > commons-lang.jar: 2.1 2.2 > commons-logging-1.1.jar: 1.1 up to date > commons-pool.jar: 1.2 up to date > commons-validator.jar: 1.3.0 1.3.1 > jakarta-oro.jar: 2.0.7 2003-01-25 09:27:58 2.0.8 >
I upgraded these jars as suggested ... and it made no difference. But a reference to a ActionContextCleanUp filter on the struts2/s2 mailing list (http://www.nabble.com/forum/ViewPost.jtp?post=8741039&framed=y look for the post by Andrew Stepanenko) gave me the solution. In web.xml, I added: <filter> <filter-name>struts-cleanup</filter-name> <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class> </filter> before the struts filiter declaration (is order important?) and <filter-mapping> <filter-name>struts-cleanup</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> before the sitemesh filter mapping (is order important?) I copied these definitions from the struts 2.0.1 showcase web.xml. There is a suggestion in the documentation at http://struts.apache.org/2.x/docs/webxml.html that there may be some struts cleanup required when using sitemesh. Anyway file upload is now working reliably (I downgraded the above jars and it still worked reliably) Is there a smiley for saying way over my head? |----- :-o or something -- View this message in context: http://www.nabble.com/struts2-file-upload-very-unreliable--tf3148047s2369.html#a8789329 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
