Web
文章平均质量分 76
文若小书生
淫慢则不能励精,险躁则不能冶性。
展开
-
使用commons-fileupload上传文件
public class FileUploadServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, res原创 2013-09-23 12:34:29 · 847 阅读 · 0 评论 -
Google之gson的使用
public class JsonTest {public static void main(String[] args) {Gson gson = new Gson();SimpleDateFormat simple = new SimpleDateFormat("yy年MM月dd日 HH:mm");User u1 = new User();u1.setAge(200);u1.se原创 2013-09-23 12:53:19 · 722 阅读 · 0 评论 -
Servlet实现文件下载功能
下面是使用Servlet进行服务器下载文件:package com.servlet;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.ServletOutp原创 2013-09-24 11:41:43 · 839 阅读 · 0 评论 -
模仿Ajax的动态无刷新上传文件
使用到的jar文件:commons-fileupload-1.3.jar,commons-io-2.4.jarjsp页面:<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServer原创 2013-09-28 17:45:28 · 822 阅读 · 0 评论 -
Java使用JNI调用DLL的问题总结
最近做项目的要使用Java调用DLL文件,但是调用DLL文件呢,也分两种情况。 1.Java Project调用DLL 2.Web Project调用DLL首先,我们讨论第一种情况。在java项目中调用dll是很简单的,一般我们使用System类中的两个方法加载我们的dll. 1.System.load(“dll文件的绝对路径”);原创 2013-12-05 11:52:59 · 2102 阅读 · 0 评论 -
MIME类型总结
$mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-st原创 2014-06-08 17:47:25 · 538 阅读 · 0 评论