avatar
sevlet question# Java - 爪哇娇娃
f*y
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
avatar
A*o
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

avatar
f*y
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.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。