hi there,
I want to upload a video in my project folder(e.g. uploadedvideo) and save the name of the video in mysql database using jsp servlet. earlier I have found some code in net which required the destination path like c:...\uploadedvideo etc. I think if I use c: it will not work if I publish the project in web. so I need a better solution. plz help!!!!!
thanks in advance

use System.getProperty("user.home") to get the home directory of the user..works on both windows and linux

E.g.

String uploadPath=System.getProperty("user.home")+File.separatorChar+"your-directory-name";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.