i want to upload an image file to server, and i’ve uploaded successfully to server.But i have a “images” folder in my project’s folder, and i want to save image in this folder. How can i do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe you are having trouble finding the path to your folder ?
In a JSP use
String path = application.getRealPath(“/images”);
In a Servlet use
String path = getServletContext().getRealPath(“/images”);