0

I have an ear file built which has a war file inside.The war has web.xml which has servlet defined:

<servlet>
    <servlet-name>ExcelDownload</servlet-name>
    <servlet-class>web.ExcelDownload</servlet-class>
    <multipart-config>
        **<!--<max-file-size>1048576</max-file-size> -->**
    </multipart-config>
</servlet>

The problem here is my in ear file max-file-size is commented that means there are no attributes defined for the multipart-config. But when I deploy my ear on WebSphere 8.5.5.9, it changes my web.xml to:

<servlet>
    <servlet-name>ExcelDownload</servlet-name>
    <servlet-class>com.ofss.infra.web.ExcelDownload</servlet-class>
    <multipart-config>
        <max-file-size>0</max-file-size>
        **<max-request-size>0</max-request-size>**
        <file-size-threshold>0</file-size-threshold>
    </multipart-config>
</servlet>

Since the max-file-size attribute is defined as zero in web.xml I am not not able to use HTTP request to upload the file to server.

I need help on to understand why the attribute is being added by WAS though its not available in ear. I did my digging I tried during deployment not to use metadata-complete attribute to false then instead of changing web.xml WAS has created a new file web_merged.xml (this has max-file-size set to zero) and am still facing the issue.

dbreaux
  • 4,982
  • 1
  • 25
  • 64
Ajay Kumar .G
  • 61
  • 1
  • 6
  • kumar Have you found why it happens, and how to fix it? – Heinz Apr 05 '19 at 18:32
  • Dear ... i raised this issue with IBM WAS team through the license we have in our bank and the IBM team gave a fix not to auto populate the max file size value to 0 as it’s not available in web.xml of my application and also as per multiconfig the default value should be -1 in case no value is available so they fixed it – Ajay Kumar .G Apr 08 '19 at 07:54

0 Answers0