So, I have a jsp with form, it converts the image to b64 and sends as a pro servlet string the servlet converts to b643
String stt = request.getParameter("base64img");
try{
String parts[] = stt.split(",");
String imgPart = parts[1];
BufferedImage image = null;
byte[] imageByte;
BASE64Decoder decoder = new BASE64Decoder();
imageByte = decoder.decodeBuffer(imgPart);
ByteArrayInputStream bis = new ByteArrayInputStream(imageByte);
image = ImageIO.read(bis);
bis.close();
// write the image to a file
File outputfile = new File("image.png");
ImageIO.write(image, "png", outputfile);
}catch(Exception e){
e.printStackTrace();
}
And it writes the image to the project src, how do I retrieve this path to insert into the database ??