jsp - Upload image to server in Java -


I want to upload an image file to the server, and I have successfully uploaded to the server. But I have the "images" folder in my project folder, and I want to save the image in this folder how can I do it?

Maybe you are having trouble finding the path in your folder?

  • string path = application.getRealPath ("/ images") in a JSP;

  • String Path = getServletContext () in a service. GetRealPath ("/ images");

Comments