i 想知道如何在java的网络服务器(tomcat 7.0)中制造一个倍数。
iam最近启动了一个项目。 在该项目中,需要从客户机器上将档案上载到服务器。 每个客户都有自己的双倍服务器,并将档案上载。
在每个用户夹中,我们有两多份jsp文档。 当用户要求服务器用该文档显示其上载数据时(例如:处理:编号/使用/索引.jsp)。
是可能的?
please,guide me to solve this problem. thanks.
i 想知道如何在java的网络服务器(tomcat 7.0)中制造一个倍数。
iam最近启动了一个项目。 在该项目中,需要从客户机器上将档案上载到服务器。 每个客户都有自己的双倍服务器,并将档案上载。
在每个用户夹中,我们有两多份jsp文档。 当用户要求服务器用该文档显示其上载数据时(例如:处理:编号/使用/索引.jsp)。
是可能的?
please,guide me to solve this problem. thanks.
至于你的具体问题,与 Java的正常申请一样。
File root = new File("/path/to/all/uploads");
File newfolder = new File(root, "/userid");
newfolder.mkdir();
// ...
As to your idea with those copypasted JSP files over all folders, don t do that. Just have a single servlet which is mapped on for example /files/*
and reads the folder specific to the currently logged-in user and finally forwards to the JSP to present the results. Or if your intent is really to make the uploads public to everyone so that each user can see each other s uploads, then supply the desired user ID as parameter or pathinfo in the request URL like so http://localhost:8080/context/files/userid
.
请注意,你应当把档案存放在经扩大的WAR文件夹中,或者每当你重新调配网上申请时,就会丢失。 在Tomcat s/webapps
外的固定道路上储存。
http://docs.oracle.com JDK7的新文件I/O机制。 See also the Java I/O Tutorial 。ache Commons IO。
我们来到这里。
try {
File f = new File("file/path/name/.ext");
if(!f.isDirectory()) {
boolean success = (new File(f)).mkdirs();
}
if(success) {
System.out.println("Success")
}
} catch(Exception e) {}
这就是说。 我希望这在功能上能够做到。 Ciao
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...
If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...