允许在websphere中进行偶然的多部分解析?

时间:2015-12-11 11:27:55

标签: websphere websphere-7 websphere-8

简单地询问如何在websphere中允许偶然的多部分解析,因为我知道我们在context.xml中使用tomcat但是因为我是websphere的新手,所以没有想法。可以帮助我吗?

  

如果Tomcat应自动解析multipart / form-data,则设置为true   HttpServletRequest.getPart *或请求体   即使在目标时,也会调用HttpServletRequest.getParameter *   servlet未标记@MultipartConfig注释(请参阅Servlet   规范3.0,第3.2节(详情)。请注意任何设置   除了false之外,Tomcat的行为方式不是   符合技术规范。默认值为false。

1 个答案:

答案 0 :(得分:5)

目前,当未根据servlet规范设置servlet时,Websphere不支持解析多部分请求主体。但是,您可以在应用程序的web.xml中设置servlet,而不是使用注释。例如:

<servlet>
    <servlet-name>MyServlet</servlet-name>
    <multipart-config>
        <max-file-size>100000</max-file-size>
        <max-request-size>200000</max-request-size>
        <file-size-threshold>50000</file-size-threshold>
    </multipart-config>
</servlet>

https://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/cweb_webcontainer_behavior.html