sta*_*ker 4 java jboss seam file-upload apache-commons
我在一个单独的war文件中部署时创建了一个工作正常的servlet,但我打算将它用作seam应用程序的一部分.
我使用commons-fileupload,但迭代器(请参阅片段)返回false(仅当包含在seam-app中时).
有任何想法吗?
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
String action = request.getParameter( "action" );
if ( ServletFileUpload.isMultipartContent( request ) ) {
log.info( "MULTIPART" );
}
ServletFileUpload upload = new ServletFileUpload();
FileItemIterator iter = upload.getItemIterator( request );
// --------- hasNext() returns false, only in seam -----------
while ( iter.hasNext() ) {
......
}
Run Code Online (Sandbox Code Playgroud)
附加信息:我不想使用此处描述的技术,因为上传客户端是卷曲的.
的HttpServletRequest是由包裹org.jboss.seam.web.IdentityRequestWrapper使用缝
我不得不插入
<web:multipart-filter create-temp-files="true"
max-request-size="1000000"
url-pattern="*.seam"/>
Run Code Online (Sandbox Code Playgroud)
成 components.xml
| 归档时间: |
|
| 查看次数: |
1259 次 |
| 最近记录: |