title: Struts2-File Upload Interceptor: after uploading file name is not appearing
body: <p>In my struts2 application I am using “File Upload Interceptor”. Its running well but after uploading when same jsp page appears it does not show browsed file name in the textbox of <code>&lt;s:file&gt;</code> tag i.e textbox comes empty after successful uploading.
  Here is my code snippet-</p>
  
  <p><strong>main.jsp</strong></p>
  
  <pre><code>&lt;s:form action="smAction" enctype="multipart/form-data" theme="simple"&gt;
  &lt;s:file name="sample"/&gt;
  &lt;s:submit action="uploadSample" value="All upload" /&gt;
  &lt;/s:form&gt;
  </code></pre>
  
  <p><strong>struts.xml</strong></p>
  
  <pre><code>&lt;action name=" uploadSample " class=" UploadMySample"&gt;
  &lt;interceptor-ref name="defaultStack"/&gt;
  &lt;result name="input"&gt; /login.jsp&lt;/result&gt;
  &lt;result name="success"&gt;/main.jsp&lt;/result&gt;
  &lt;/action&gt;
  </code></pre>
  
  <p><strong>UploadMySample.java</strong></p>
  
  <pre><code>public class UploadMySample extends ActionSupport {            
    private File sample;
    private String sampleContentType;
    private String sampleFileName;
  
    public File getSample () {
        return sample; 
    }
    public void setSample (File sample) {
        this. sample = sample;
    }
    //Here is the file uploading code
    return SUCCESS; 
  
  }
  </code></pre>
  
  <p><strong>Please suggest.</strong></p>