Param Ganak

+ Follow
since May 09, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Param Ganak

Ulf Dittmer wrote:That's easy: use a directory that's outside of the webapps directory. That way it's not accessible directly, and won't get removed if your web app is undeployed. You can still configure the path in web.xml if you want.

Thanks for your reply!

My few queries are as follows
1) What happen when my web server is changed?
2) My application will be get hosted on a third party hosting and not on my own server in this case does that hosting company will going to allow me to maintain a separate folder outside my web application directory? In this case is this approach is secure so that no other will access my files without my application?

Thank You!
5 years ago
Hello Friends!
I want to develop a file sharing web application. Whose functionality is something as follows.
1. User logs in to my web site.
2. Fills a form regarding file description and give local path to the files they want to upload.
4. After submitting the form the web application will creates a directory in given fix common directory location and stores the file in it.
3. A fix directory location is available to my web application either in hard coded way or using web.xml file in which it will be set either using context or config parameters which will be decided later.
4. The file size may vary from few MB's to few hundred MB's. File types may be image file, pdf file, or office files.
5. I don't want to store these files in database tables.
6. Whenever user want to see these files he will get the list of file names on a page. User need to click on the link of file name so that respective file will be visible in his browser.

My question are as follows

1) Where to store these uploaded files on server very securely as per standards?
As I want to put these files on server securely so that nobody can access these files by bookmarking the url to these files or without loging in to my site.
Most of the times the files are uploaded to a specified directory which is located in web application directory on web server which looks very suitable to my requirements.
But main issue with this approach is that whenever I will going to redeploy my application the files in this directory will be deleted.

Please guide me friends where do I put the files securely and make available to user for view them easily?
Thank You!
5 years ago
I need your suggestions and guidance in following task. I am using libdmtx which comes with a command line utility which reads the image files for ECC200 Data Matrix barcodes, reads their contents, and writes the decoded messages to standard output. I want to use this command line utility in my java program on linux platform. I amd using ubuntu linux. I have installed the libdmtx on my linux machine. and when I invoke the command

dmtxread -n /home/admin/ab.tif

on linux terminal it gives the decoded value of barcode in image immediately.

when I am going to invoke this command using my java program the code stuks in execution of the command and dotn gives output. it looks like the program is processing or got hang.

Following is my java code which invokes the following command

Please tell me friends where my code is going wrong.

I refered to following article but dint get any help

Please guide me friends! Thank you!

Here is the new code in which I used the ProcessBuilder Class this code also giving the same output as above code that is it hangs at the line Process process = pb.start();

Please guide me to solve this problem. Thanks You!
5 years ago