f*******y 发帖数: 348 | 1 I am trying to use apache fileupload to load file from a desktop application
to a server by using HttpClient. I could do the upload. The problem is I
need also sent some other information from the client to the server, so the
servlet knows where to store those upload files and also send the actural
directory back.
My questions is how could I send those information to the servlet and how
can I get the directory information back?? I am new to J2EE, I am really
confused, please help. Thanks | A**o 发帖数: 1550 | 2 it's pretty hard indeed if you don't know http basic before using servlet.
hint: put all the info in http request and get your dir info in http
response.
let's discuss more details after this.
application
the
【在 f*******y 的大作中提到】 : I am trying to use apache fileupload to load file from a desktop application : to a server by using HttpClient. I could do the upload. The problem is I : need also sent some other information from the client to the server, so the : servlet knows where to store those upload files and also send the actural : directory back. : My questions is how could I send those information to the servlet and how : can I get the directory information back?? I am new to J2EE, I am really : confused, please help. Thanks
| f*******y 发帖数: 348 | 3 Currently I am using the following code on in servlet to send my dir back
PrintWriter out = response.getWriter();
out.println(dir);
out.close();
and on the client side, I use
postMethod.getResponseBodyAsString()
to get the dir back. But I feel this is not the best method, is there a
better way to do it?
****************************************************************************
**
For sending information from client to the servlet, I was tring to use the
following on the client side
postMethod. |
|