title: struts 2 using ajax to upload a file
body: <p>I use struts 2, including ajax, to upload a file, everything works when downloading, I get the file, but the response page,returned by the action executed after uploading 
  file, is completely distorted, it return an error in my base.js: ($. ajaxSetup ({is not defined)
  Here the action called to save my file</p>
  
  <pre><code>public String saveFile() throws Exception { 
          if(uploadFileName!=null){
               String chemin=context.getRealPath("");
               File dirWebapps = new File(chemin);
               String fullFileName =myUrl+"/"+uploadFileName;
               File theFile = new File(dirWebapps.getParent(),fullFileName);
               FileUtils.copyFile(upload, theFile);
               URL repertoire = theFile.getParentFile().toURL();
              }
                   return "myPage";
           }
  </code></pre>
  
  <p>please,can someone help me</p>
  
  <p>I define a bean in struts.xml file upload as follows: </p>
  
  <p> </p>
  
  <p>and "myPage" contains </p>
  
  <pre><code>&lt;%@ taglib prefix="s" uri="/struts-tags"%&gt; &lt;%@ page contentType="text/html; charset=utf-8"%&gt; &lt;%@ taglib prefix="sj" uri="/struts-jquery-tags"%&gt; &lt;script type="text/javascript" src="js/base.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function(){ ///something }) &lt;/script&gt; &lt;s:form id="courrierModel" validate="true" theme="simple" cssStyle="margin:0;padding:0px" enctype="multipart/form-data" method="GET"&gt; some content &lt;/s:form&gt;
  </code></pre>