ueditor 图片在线管理显示不了发现是返回的物理路径“”问题,在controller.jsp里做如下修改

    xiaoxiao2021-09-23  130

    返回的物理路径“/”问题,在controller.jsp里做如下修改

    <%@ page language="java" contentType="text/html; charset=UTF-8"       import="com.baidu.ueditor.ActionEnter"       pageEncoding="UTF-8"%>   <%@ page trimDirectiveWhitespaces="true" %>   <%          request.setCharacterEncoding( "utf-8" );       response.setHeader("Content-Type" , "text/html");              String rootPath = application.getRealPath( "/" );              String action = request.getParameter("action");       String result = new ActionEnter( request, rootPath ).exec();       if( action!=null && (action.equals("listfile") || action.equals("listimage") ) ){           rootPath = rootPath.replace("\\", "/");           result = result.replaceAll(rootPath, "/");//把返回路径中的物理路径替换为 '/'       }       out.write( result );                  //out.write( new ActionEnter( request, rootPath ).exec() );          %>  

    转载请注明原文地址: https://ju.6miu.com/read-677809.html

    最新回复(0)