|
This problem happen when we use struts liferay portlet and portlet whereas if we use jspportlet all work well on linux and windows.
is there some probability that all depend from struts bridge? How can i solve this problem or bug? I have the same problem. The Upload which worked fine in Liferay 4.4.1 is not working anymore in Liferay 5.0.1.
Please provide a fix to this ASAP, this is really critical. The following code illustrates the problem: ------------ DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setRepository(new File("/tmp/")); ServletFileUpload upload = new ServletFileUpload(factory); // Parse the request List<FileItem> items = (List<FileItem>) upload.parseRequest(httpRequest); if (items != null) { _log.debug("Found " + items.size() + " file items in the request"); } else { _log.debug("Found no file items in the request"); } ------------ This always returns 0 items. See also http://support.liferay.com/browse/LEP-6412 |
||||||||||||||||||||||||||||||||||||||||||||||
Is a Liferay problem? a bridge struts problem? common upload library?
Req is full before to enter in parseRequest but result is List size 0.
For example using sample struts portlet:
2008-07-01 10:00:26,309 INFO [STDOUT] 1. ------>host
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>www.xxxxx.xx:5000
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>user-agent
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>accept
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2008-07-01 10:00:26,315 INFO [STDOUT] 1. ------>accept-language
2008-07-01 10:00:26,315 INFO [STDOUT] 2. ------>it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
2008-07-01 10:00:26,316 INFO [STDOUT] 1. ------>accept-encoding
2008-07-01 10:00:26,316 INFO [STDOUT] 2. ------>gzip,deflate
2008-07-01 10:00:26,316 INFO [STDOUT] 1. ------>accept-charset
2008-07-01 10:00:26,316 INFO [STDOUT] 2. ------>ISO-8859-1,utf-8;q=0.7,*;q=0.7
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>keep-alive
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>300
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>connection
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>keep-alive
2008-07-01 10:00:26,317 INFO [STDOUT] 1. ------>referer
2008-07-01 10:00:26,317 INFO [STDOUT] 2. ------>http://www.xxx.xx:5000/web/guest/home?p_p_id=sample_struts_portlet_WAR_struts2&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_sample_struts_portlet_WAR_struts2__spage=%2Fportlet_action%2Fsample_struts_portlet%2Fupload%2Frender
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>cookie
2008-07-01 10:00:26,327 INFO [STDOUT] 2. ------>JSESSIONID=947F2E4291518349137355412E2189FB; GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>content-type
2008-07-01 10:00:26,327 INFO [STDOUT] 2. ------>multipart/form-data; boundary=---------------------------5436261537937
2008-07-01 10:00:26,327 INFO [STDOUT] 1. ------>content-length
2008-07-01 10:00:26,328 INFO [STDOUT] 2. ------>169795
2008-07-01 10:00:26,328 INFO [STDOUT] Dimensioni di ITEMS : --------------> 0