You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sandeep@I2IT" <sa...@gmail.com> on 2010/04/07 12:20:57 UTC

Struts2 File Upload

Hello All,

    In my file upload program of struts 2 in HTTP Monitor window of Netbeans
im getting <h3>Data sent with this request was not parameterized</h3>


Thanks in Advance
-- 
View this message in context: http://old.nabble.com/Struts2-File-Upload-tp28163069p28163069.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 File Upload

Posted by "Sandeep@I2IT" <sa...@gmail.com>.
JSP page        

                      <s:form method="post" action="test_upload"
enctype="multipart/form-data">
                                    <s:textfield id="type" name="jids"
label="Job Id"/>
                                    <s:file name="files" label="File"/> 
                                    <s:submit/></s:form> 

My Action Class

  public class TestUpload  extends ActionSupport{

    public TestUpload() {
    }

    public String execute() throws Exception {
        Logger.getLogger(this.getClass().getName()).log(Level.INFO,"File
Name \n"+getFilesFileName());
        Logger.getLogger(this.getClass().getName()).log(Level.INFO,"File
Type \n"+getFilesContentType());
             ---------
            --------------
        -------------------------

        return SUCCESS;
    }


 private String jids;
    private File files;
    private String filesContentType;
    private String filesFileName;


// gettter and setters


All i want is just to print the name 
-- 
View this message in context: http://old.nabble.com/Struts2-File-Upload-tp28163069p28163274.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 File Upload

Posted by Kun Niu <ha...@gmail.com>.
How did you write your file upload form?

Sandeep@I2IT wrote:
> Hello All,
>
>     In my file upload program of struts 2 in HTTP Monitor window of Netbeans
> im getting <h3>Data sent with this request was not parameterized</h3>
>
>
> Thanks in Advance
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org