在jsp中在运行时分配文件夹名称 [英] assign folder name on runtime in jsp
问题描述
< input type =textname =text1id =text1/>
<%
String s = request.getParameter(text1);
java.io .File file = new File(c:/ jk);
if(!file.exists())
file.mkdirs();
else
out.println(文件存在);
%>
如何在运行时而不是jk中指定该文件夹的名称。 ..
这意味着我在text1中提供了一个随机名称,文件夹应该用随机名称保存..
< b>
<input type="text" name="text1" id="text1"/>
<%
String s=request.getParameter("text1");
java.io.File file = new File("c:/jk");
if (!file.exists())
file.mkdirs();
else
out.println("the file exists");
%>
how can i assign name of that folder on run time instead of jk...
that means i gave a random name in text1 and folder should be saved with that random name..
推荐答案
这篇关于在jsp中在运行时分配文件夹名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!