import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
+import java.net.URLDecoder;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
String urlPath = url.getPath();
- String templateLibPath = urlPath + File.separator;
+ String templateLibPath;
+
+ try {
+ urlPath = URLDecoder.decode(urlPath, "utf-8");
+ urlPath = new File(urlPath).getPath();
+ templateLibPath = urlPath + File.separator;
+ } catch (UnsupportedEncodingException e) {
+ logger.error("not decode url path", e.getMessage());
+ return null;
+ }
// if the url is not expressed jar file
if(urlPath.contains("!"))