...
|
...
|
@@ -42,11 +42,11 @@ public class CMSHtmlController { |
|
|
response.setContentType("application/json; charset=UTF-8");
|
|
|
try{
|
|
|
//取context下的html文件转成文件流
|
|
|
String filePath = request.getServletContext().getRealPath(url);
|
|
|
logger.info("getContentHtml: filePath is {},realPath is {}", filePath, request.getServletContext().getRealPath("/"));
|
|
|
File f = new File(filePath);
|
|
|
String filePath = request.getServletContext().getRealPath("/");
|
|
|
logger.info("getContentHtml: filePath is {}", filePath);
|
|
|
File f = new File(filePath + url);
|
|
|
logger.info("getContentHtml: file is {}, file path is {}", f, f.getPath());
|
|
|
fis = new FileInputStream(filePath);
|
|
|
fis = new FileInputStream(filePath + url);
|
|
|
|
|
|
os = new BufferedOutputStream(response.getOutputStream());
|
|
|
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
|
...
|
...
|
|