controller.jsp 742 B

123456789101112131415161718192021
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. import="org.cs.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. String action = request.getParameter("action");
  9. String result = new ActionEnter( request, rootPath ).exec();
  10. if( action!=null && (action.equals("listfile") || action.equals("listimage") ) ){
  11. rootPath = rootPath.replace("\\", "/");
  12. result = result.replaceAll(rootPath, "/");//把返回路径中的物理路径替换为 '/'
  13. }
  14. out.write( result );
  15. //out.write( new ActionEnter( request, rootPath ).exec() );
  16. %>