controller.jsp 718 B

123456789101112131415161718
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. import="com.baidu.ueditor.ActionEnter" pageEncoding="UTF-8"%>
  3. <%@ page trimDirectiveWhitespaces="true"%>
  4. <%
  5. request.setCharacterEncoding("utf-8");
  6. response.setHeader("Content-Type", "text/html");
  7. String rootPath = application.getRealPath("/");
  8. //out.write( new ActionEnter( request, rootPath ).exec() );
  9. String action = request.getParameter("action");
  10. String result = new ActionEnter(request, rootPath).exec();
  11. if (action != null && (action.equals("listfile") || action.equals("listimage"))) {
  12. rootPath = rootPath.replace("\\", "/");
  13. result = result.replaceAll(rootPath, "");
  14. }
  15. out.write(result);
  16. %>