I'm trying to upload a image to server... using JSP
In JSP:
input id="fileUpload" type="file" name="file"
In Java:
File file = new File( request.getParameter("file"));
String path = file.getAbsolutePath();
BufferedImage sourceImage = ImageIO.read(new File(path));
ImageIO.write(sourceImage, "jpg", new File("E:/h.jpg"));
If upload an image using internet explorer it works...but in chrome, Firefox and safari browser shows the filepath "fakepath/filename.jpg" and the image cant read.