private void downloadrun(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		FileBean file = null;
		try {
			String filedir = getServletContext().getRealPath("/files"); // ȡļڵĴ·
			System.out.println(filedir + "---ȡļڵĴ·");
			String downfilename = request.getParameter("downname"); // ȡڴϵļ
			System.out.println(downfilename + "---downfilename");

			FileDao fileDao = new FileDao();
			file = fileDao.getFileSingle(downfilename);
			fileDao.closed();
			if (file != null) {
				String filename = new String(file.getFileName().getBytes(
						"gb2312"), "ISO-8859-1"); // дصļ
				FileXLoad myxload = new FileXLoad();
				myxload.init(request, response, filedir);
				myxload.download(downfilename, filename, file.getFileType());
			}
		} catch (Exception e) {
			e.printStackTrace();
			String message = " ʧܣļ <b><font color='red'>"
					+ file.getFileName() + "</font></b> ڻѾɾ<br>";
			message += "<a href='javascript:window.history.go(-1)'></a>";
			request.setAttribute("message", message);
			RequestDispatcher rd = request.getRequestDispatcher("/message.jsp");
			rd.forward(request, response);
		}
	}