You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Andy Brook (JIRA)" <ji...@apache.org> on 2007/04/11 15:43:52 UTC

[jira] Created: (WW-1880) File Uploads not reproducable (after first time success)

File Uploads not reproducable (after first time success)
--------------------------------------------------------

                 Key: WW-1880
                 URL: https://issues.apache.org/struts/browse/WW-1880
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.6
         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
            Reporter: Andy Brook


I'm not sure if this is a bug, is a documentation issue or a feature enhancement...

Scenario: 
A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-

http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html

In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>ITDS Order Processing application</display-name>

    <filter>
        <filter-name>struts-cleanup</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
    </filter> 

    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
 
    <filter-mapping>
        <filter-name>struts-cleanup</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>   

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    
</web-app>

---

With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Commented: (WW-1880) File Uploads not reproducable (after first time success)

Posted by "Bruno Viana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40782 ] 

Bruno Viana commented on WW-1880:
---------------------------------

Attempt to

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping> 

Change it to

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping> 

The FileDispatcher fails to cleaning up your context when you make a request that isn't mapped in struts.xml. For instance, if you make a request such mycss.css, struts doesn't clean up your context and your interceptor will fail in the next time.

But, if you change /* to *.action in your web.xml, struts will not process request shuch *.css, *.js, etc.

Of course that your solution works fine too because you'll force a context cleaning.

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Updated: (WW-1880) File Uploads not reproducable (after first time success)

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

James Holmes updated WW-1880:
-----------------------------

    Affects Version/s: 2.0.10
                       2.0.7
                       2.0.8
                       2.0.9
        Fix Version/s:     (was: 2.0.10)
                       2.0.11

Moving to 2.0.11 in preparation for 2.0.10 release.

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>             Fix For: 2.0.11
>
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Updated: (WW-1880) File Uploads not reproducable (after first time success)

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

James Holmes updated WW-1880:
-----------------------------

    Fix Version/s:     (was: 2.0.11)
                   2.0.12

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>             Fix For: 2.0.12
>
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Updated: (WW-1880) File Uploads not reproducable (after first time success)

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

Don Brown updated WW-1880:
--------------------------

    Fix Version/s: 2.0.9

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>             Fix For: 2.0.9
>
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Resolved: (WW-1880) File Uploads not reproducable (after first time success)

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

Don Brown resolved WW-1880.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

I believe this has been fixed, although I'm not sure when it was fixed, only that I cannot reproduce it with the showcase application.

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>            Assignee: Don Brown
>             Fix For: 2.1.2
>
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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


[jira] Updated: (WW-1880) File Uploads not reproducable (after first time success)

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

James Holmes updated WW-1880:
-----------------------------

    Fix Version/s:     (was: 2.0.9)
                   2.0.10

Moving to 2.0.10 so that 2.0.9 can be released.

> File Uploads not reproducable (after first time success)
> --------------------------------------------------------
>
>                 Key: WW-1880
>                 URL: https://issues.apache.org/struts/browse/WW-1880
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>         Environment: linux (ubuntu edgy), amd64, jboss405, SUN150
>            Reporter: Andy Brook
>             Fix For: 2.0.10
>
>
> I'm not sure if this is a bug, is a documentation issue or a feature enhancement...
> Scenario: 
> A form, with multiple uploads, I used the code from the showcase as a template.  The first multi-file upload works fine.  the second attempt using exactly the same form and files fails with 'empty' form File values.  I finally found this thread which finally gave me the solution:-
> http://www.nabble.com/struts2-file-upload-very-unreliable--t3148047s2369.html
> In order to use file upload in struts 2.06, I have to modify the web.xml to include two 'struts-cleanup' chunks.  With the changes it works, without, it fails:-
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>ITDS Order Processing application</display-name>
>     <filter>
>         <filter-name>struts-cleanup</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
>     </filter> 
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>  
>     <filter-mapping>
>         <filter-name>struts-cleanup</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>   
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>     
> </web-app>
> ---
> With all the coding by expectation, should this need to be done?  I haven't read into it further but it solves the file upload problem.  I's there an issue in the File Upload not clearing up session state properly requiring these changes? 

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