2
我正在使用richface 3.3.3與Seam 2.2。,Jboss 6.1 我正在使用嘗試使用rich:fileupload組件。當我在Linux服務器上部署我的代碼時,當我嘗試在我的Windows服務器上完全相同的代碼時,它可以正常使用文件高達1.9GB的文件時,我得到10 MB以上的文件錯誤。richface fileupload文件大小受限制的錯誤
Windows 7,Ubuntu作爲服務器正常工作。 紅帽企業Linux服務器版本6.2(聖地亞哥)dosn't工作。
我走在web.xml
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
<init-param>
<param-name>maxRequestSize</param-name>
<param-value>1900000000</param-value>
</init-param>
<init-param>
<param-name>createTempFiles</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
我的文件uppload組件以下設置。
<rich:fileUpload id="fileUploadId" uploadControlLabel="Ladda Ner"
addControlLabel="Filer..." cancelEntryControlLabel="Ta bort"
maxFilesQuantity="1000" uploadButtonClassDisabled="invisible"
stopButtonClass="invisible" onadd="_onaddHandler(event);" onerror="_onerrorhandle(event);"
fileUploadListener="#{deliveryInAction.fileUploadListener}"
onupload="Richfaces.showModalPanel('wait-dialog-upload');"
onuploadcomplete="archive();" allowFlash="auto" styleClass="syll-file-upload"/>
請問究竟是什麼意思「不起作用」?你會得到範例外還是關於文件大小的一些警告?你可以在託管bean中放置一個調試行來顯示上傳過程中的上下文參數值嗎? – kolossus
是的,上下文參數值是應該的,但它永遠不會進入richface過濾器。不工作意味着在豐富的組件中返回錯誤文件大小受限。我從我的RedHat服務器複製我的整個JBoss到一個Ubuntu服務器,並在那裏運行它,它也工作(我ziped jboss文件夾和unziped在Ubuntu上) – Trind