tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Problem moving from file upload servlet to JSP
Date Mon, 19 Apr 2010 21:19:29 GMT
Ken Bowen wrote:

> Long form.  Here's the html for file upload (vanilla):
> <form name="csvUploadForm" action="csvfileupload" method="post" 
> enctype="multipart/form-data">
>     File:<input type="file" name="csvfile2upload"><br></br>
>     <input type="submit" name="Submit" value="Upload CSV File" 
> onclick="uploadCSVFile();return false;">
> </form>
Without and before getting to the Java stuff, I do not really understand 
why above you have a button of type "submit", but with an "onClick" 
event triggering a javascript function.
Either the button should be of type "button" and have an onClick event 
handler, or it should be of type "submit" and not have an event handler.
I suspect that by specifying both, you may be generating 2 actions and 
confusing the browser and/or the receiving end.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message