File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Creating directory structure in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Creating directory structure in servlet" Watch "Creating directory structure in servlet" New topic

Creating directory structure in servlet

Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
I have form in which user fills some information related to a project. When user hit the submit , it should save everything in database(that is fine,that is working) but also i want that when user hit submit, that servelt which is inserting everything in database should also create a directory structure like this:
proejctname can be any name which user fills at the time of filling information in the form.

plz help.
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
check out which has APIs to create dirs.
Deepak Chawla
Ranch Hand

Joined: Nov 19, 2003
Posts: 50
i found in method called mkdir, i have specified(c://itarch/project_docs) path in properties file, so shall i specify properties files in mkdir() and how would i get projectname. for inserting in database i will have getparameter method to pass projectname from my form to servlet. so how do i get proejctame in mkdir. The above path is common for everyone.
plz help.
I agree. Here's the link:
subject: Creating directory structure in servlet
Similar Threads
HTML to XML Conversion and Vice Versa
directory in servlet
Data across multiple actions
inserting checkbox in database
What is the result of Prepared Statement