Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing name to directory/file

 
reddy kl
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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);
}
%>
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
hi Sean,
thank u for kind response.i got it.
regds
dev
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!