I want to take image as input into my web page. I have written following code in my jsp for this :-
<form action="Upload" method="get" enctype="multipart/form-data">
Image<input type="file" name="image" accept="image/jpg" id="image">
<input type="submit" value="submit">
</form>
but I do not know how to receive the "image" parameter in a servlet that is whether it should be a input stream or file, I have no idea. Please tell me the correct code for it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…