jsp转html

/**
	 * @param uri
	 *            jsp访问路径
	 * @param path
	 *            html生成路径
	 * @throws Exception
	 */
	public static String createHtml(String uri, String path) throws Exception {
		try {
			String str = "";

			// uri = PathUtil.PathAddress() + uri ; //拼接访问的jsp服务器地址
			// path = PathUtil.getClasspath() + path; //拼接存放html的路径

			// 根据路径生成文件
			File dirFile = new File(path.substring(0, path.lastIndexOf("/")));
			boolean bFile = dirFile.exists();
			if (!bFile) {
				bFile = dirFile.mkdirs();
			} else {
				System.out.println("文件夹已存在,无需创建!");
			}

			// 通过URL访问jsp
			System.out.println("-----uri-----" + uri);
			System.out.println("-----path-----" + path);

			// writeFile(result,path.substring(0,path.lastIndexOf("/")+1),path.substring(path.lastIndexOf("/")+1));
			URL url = new URL(uri);
			HttpURLConnection uc =