81,094
社区成员
发帖
与我相关
我的任务
分享
<%@ 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 );
%>
以上直接覆盖原来的controller.jsp就可以了,当然不敢保证每个版本都是这样
代码出处:http://blog.csdn.net/gaoxiaogs/article/details/52621755
好了结贴了,分我就看着给了
$(function(){
var pageContent="'${pageContent}'";
alert(pageContent);
});
var ue=UE.getEditor('editor',{
//,initialContent : pageContent
})
错误是:Uncaught SyntaxError: Unexpected identifier
初始化注释起来都没用,我这么写他就报错 - -/**
* ffmpeg将其他格式转换成其他格式文件(未指定其他任何参数)
* ffmpeg能解析的格式:(asx,asf,mpg,wmv,3gp,mp4,mov,avi,flv等)
* @param prefix 前缀
* @param srcVideoPath 视频文件(原)
* @param middlefix 中间的字符转
* @param srcVideoPath 视频文件(转换后的路径)
* @param suffix 结束的字符串
* @return
*/
public static boolean processFfmpegShellScript(String prefix,String srcVideoPath,String middlefix,String tarVideoPath,String suffix) {
if (!checkfile(srcVideoPath)) {
logger.error("【" + srcVideoPath + "】 不存在!");
return false;
}
List<String> commend = new java.util.ArrayList<String>();
commend.add(ffmpegPath);
// commend.add("-y");
commend.add("-loglevel");
commend.add("quiet");
commend.add("-i");
if(prefix != null && !prefix.equals("")){
commend.add(prefix);
}
commend.add(srcVideoPath);
if(middlefix != null && !middlefix.equals("")){
commend.add(middlefix);
}
commend.add(tarVideoPath);
if(suffix != null && !suffix.equals("")){
commend.add(suffix);
}
try {
ProcessBuilder builder = new ProcessBuilder();
builder.command(commend);
Process process = builder.start();
doWaitFor(process);
process.destroy();
if (!checkfile(tarVideoPath)) {
logger.error("【" + tarVideoPath + "】 processFfmpegShellScript 转换不成功 !");
return false;
}
return true;
} catch (Exception e) {
logger.error("【" + srcVideoPath + "】 processFfmpegShellScript 转换不成功 !");
return false;
}
}