• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

passing name to directory/file

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ..here i am creating a directriry by giving name in the code itself but i want to give it from front end..means i want to pass the direcory name as parameter..
here is my code..
can anyone come with modification to this code..
thanks in advance
<%@ page language="java" import="java.io.*"%>
<%
File f = new File("[drive]:/anypath/newdir");
if(f.exists()) {
out.println(f + " exists");
}
else { // Doesn't exist
f.mkdirs();
//out.println("created " + f);
}
%>
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey.
Not so sure what your question is here. Do you want to know how to pass parameters (specifying the new dir/file path) to this page?
Sean
 
reddy kl
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Sean,
thank u for kind response.i got it.
regds
dev
 
reply
    Bookmark Topic Watch Topic
  • New Topic