controller.jsp 663 B

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