你不是已经可以通过XMLHttp传送到server了么。
server端得要自己解析request.getInputStream();
server端得要自己解析request.getInputStream();
解决方案 »
- 关于Spring Cache
- jsp错误,急求帮忙!!
- 求问hibernate HQL语句中问题
- myeclipse6.5 webshpere6.1整合问题
- 跟大家分享一个大数据实战教程资料
- internet 访问TOMCAT问题
- Struts的validator怎么验证<html:checkbox/>
- 有偿转让Java即时通信工具源代码及设计文档
- j2ee启动问题:Exception in thread "main" java.lang.NoClassDefFoundError: Files\Common
- Lucene查询条件含空格 造成结果不一致
- J2EE AP/P是什么意思?
- 高老庄悟空降八戒 与设计模式
如果是,
那你的问题就是XML与数据库的数据交换,
基本的思路是:
XML----XML解析器-----SQL语句---数据库(先用JDBC连接好数据库)
<%!
public void writeFile(String path, ServletInputStream sis) throws IOException {
byte[] buffer = new byte[1024*10];
int bytes_read = 0;
FileOutputStream fos = new FileOutputStream(path);
while((bytes_read = sis.readLine(buffer,0,buffer.length)) != -1) {
fos.write(buffer,0,bytes_read);
}
fos.close();
}
%>
<%
//按流的方式保存,支持中文。
try {
ServletInputStream sis = request.getInputStream();
String realPath = config.getServletContext().getRealPath("\\12345.txt");
writeFile(realPath,sis);
out.print(realPath + ",保存成功!");
}
catch(Exception ex) {
out.print("保存失败!" + ex.toString());
}
%>
如果是浏览器的话,你可以用vbscript,或jscript发送.
用这个传建一个xmlHttp对象,发送到服务器就可.我做过这东西.很容易的.
不过受服务器下传数据的时候有点问题,我没解决.因为只是自己做试验,也就没在去研究了