B
bhagaban behera
i wanted to upload files using a java servlet and save it in a
directory on the server.
the html form is as given:
<FORM ACTION="/PostMultiServlet"
METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="TEXT" NAME="desc" value="">
<INPUT TYPE="FILE" NAME="filecontents" value="">
<INPUT TYPE="SUBMIT" VALUE="Submit" NAME="Submit">
</FORM>
so in the servlet (inside the doPost method :
reponse.getParameter("filecontents")
.........what does it give? just the file name or the file object itself
?
Then how do i save that file?
plz tell me.
if u have some type of code plz put it up.it will b helpfull.
thanx
directory on the server.
the html form is as given:
<FORM ACTION="/PostMultiServlet"
METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="TEXT" NAME="desc" value="">
<INPUT TYPE="FILE" NAME="filecontents" value="">
<INPUT TYPE="SUBMIT" VALUE="Submit" NAME="Submit">
</FORM>
so in the servlet (inside the doPost method :
reponse.getParameter("filecontents")
.........what does it give? just the file name or the file object itself
?
Then how do i save that file?
plz tell me.
if u have some type of code plz put it up.it will b helpfull.
thanx