Rah*_*hul 0 websphere websphere-7 websphere-8
简单地询问如何在websphere中允许偶然的多部分解析,因为我知道我们在context.xml中使用tomcat但是因为我是websphere的新手,所以没有想法.任何人都可以帮助我吗?
如果在调用HttpServletRequest.getPart*或HttpServletRequest.getParameter*时Tomcat应自动解析multipart/form-data请求体,则设置为true,即使目标servlet未使用@MultipartConfig注释进行标记(请参阅Servlet规范3.0,第3.2节)详情).请注意,除false之外的任何设置都会导致Tomcat以不符合技术规范的方式运行.默认值为false.
小智 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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
693 次 |
| 最近记录: |