急!!!!Struts + swfupload 使用actionform获得不到Filedate参数

小弟在使用swfupload组件开发文件上传时,遇到了一个问题,使用actionForm 来接收参数,但是就是或得不到Filedata参数,小弟在网上也找了相关的文档看了看,也试着将Filedata 参数修改为其他的,但是都不行,现在发帖求救,下面是小弟写的配置。。

public class SWFUploadForm extends ActionForm {
 
 private String goodsID;
 private FileItem Filedata ;
 
 public String getGoodsID() {
  return goodsID;
 }
 public void setGoodsID(String goodsID) {
  this.goodsID = goodsID;
 }
 public FileItem getUoload() {
  return this.Filedata;
 }
 public void setUoload(FileItem Filedata) {
  this.Filedata = Filedata;
 }
  
}

 

jsp:

 

<script type="text/javascript">
var swfu;

SWFUpload.onload = function () {
 var settings = {
  flash_url : "<%=request.getContextPath()%>/js/swfupload/swfupload.swf",
  upload_url: "<%=request.getContextPath()%>/swfload.jhtml?method=swfUpload",
  ////post_params: {
  //// "goodsID" : ""
  //},
  file_size_limit : "<%=perMaxSize%> <%=sizeUnit%>",
  file_types : "<%=ext%>",
  file_types_description : "<%=ext%>",
  file_upload_limit : 100,
  file_queue_limit : 0,
  custom_settings : {
   progressTarget : "fsUploadProgress",
   cancelButtonId : "btnCancel",
   uploadButtonId : "btnUpload",
   myFileListTarget : "idFileList"
  },
  debug: false,
  auto_upload:false,

  // Button Settings
  button_image_url : "<%=request.getContextPath()%>/image/search.gif", // Relative to the SWF file show.png
  button_placeholder_id : "spanButtonPlaceholder",
  button_width: 61,
  button_height: 22,

  // The event handler functions are defined in handlers.js
  swfupload_loaded_handler : swfUploadLoaded,
  file_queued_handler : fileQueued,
  file_queue_error_handler : fileQueueError,
  file_dialog_complete_handler : fileDialogComplete,
  upload_start_handler : uploadStart,
  upload_progress_handler : uploadProgress,
  upload_error_handler : uploadError,
  upload_success_handler : uploadSuccess,
  upload_complete_handler : uploadComplete,
  queue_complete_handler : queueComplete, // Queue plugin event
  
  // SWFObject settings
  minimum_flash_version : "9.0.28",
  swfupload_pre_load_handler : swfUploadPreLoad,
  swfupload_load_failed_handler : swfUploadLoadFailed
 };

 swfu = new SWFUpload(settings);
}

 

希望有朋友遇到该问题,或有解决方法的高手给 解决下吧,在线等待中。、、

你可能感兴趣的:(JavaScript,jsp,struts,ext,Flash)