資源簡介
好用,實用,供大家學習使用,下載后可直接使用。代碼齊全,有問題歡迎咨詢。
代碼片段和文件信息
/*
?*?CKFinder
?*?========
?*?http://ckfinder.com
?*?Copyright?(C)?2007-2013?CKSource?-?Frederico?Knabben.?All?rights?reserved.
?*
?*?The?software?this?file?and?its?contents?are?subject?to?the?CKFinder
?*?License.?Please?read?the?license.txt?file?before?using?installing?copying
?*?modifying?or?distribute?this?file?or?part?of?its?contents.?The?contents?of
?*?this?file?is?part?of?the?Source?Code?of?CKFinder.
?*/
package?com.ckfinder.connector;
import?java.util.HashMap;
import?java.util.Map;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.jsp.JspException;
import?javax.servlet.jsp.tagext.TagSupport;
import?com.ckfinder.connector.utils.PathUtils;
/**
?*?Source?code?of
?*?<ckfinder:setupCKEditor?/>
?tag.
?*/
public?class?CKFinderSetupCKEditor?extends?TagSupport?{
private?static?final?String?CKFINDER_UPLOAD_URL?=?“/ckfinder/core/connector/java/connector.java?command=QuickUpload&type=“;
private?static?final?String?CKFINDER_PAGE?=?“/ckfinder.html“;
private?static?final?String?DEFAULT_IMAGE_TYPE?=?“Images“;
private?static?final?String?DEFAULT_FLASH_TYPE?=?“Flash“;
/**
?*
?*/
private?static?final?long?serialVersionUID?=?3947714242365900445L;
private?String?basePath;
private?String?editor;
private?String?imageType;
private?String?flashType;
@Override
public?int?doStartTag()?throws?JspException?{
if?(imageType?==?null?||?imageType.equals(““))?{
imageType?=?DEFAULT_IMAGE_TYPE;
}
if?(flashType?==?null?||?flashType.equals(““))?{
flashType?=?DEFAULT_FLASH_TYPE;
}
Map>?attr?=?new?HashMap>();
Map?params?=?new?HashMap();
params.put(“filebrowserBrowseUrl“?buildBrowseUrl(null));
params.put(“filebrowserUploadUrl“?buildUploadUrl(“Files“));
params.put(“filebrowserImageBrowseUrl“?buildBrowseUrl(imageType));
params.put(“filebrowserImageUploadUrl“?buildUploadUrl(imageType));
params.put(“filebrowserFlashBrowseUrl“?buildBrowseUrl(flashType));
params.put(“filebrowserFlashUploadUrl“?buildUploadUrl(flashType));
if?(editor?==?null?||?editor.equals(““))?{
attr.put(“*“?params);
}?else?{
attr.put(editor?params);
}
pageContext.setAttribute(“ckeditor-params“?attr);
return?EVAL_PAGE;
}
/**
?*?Builds?browse?url?by?type?and?basePath.
?*
?*?@param?type?current?type
?*?@return?full?browse?url.
?*/
private?String?buildBrowseUrl(final?String?type)?{
return?PathUtils.escape(basePath.concat(CKFINDER_PAGE).concat(type?==?null???““?:?“?type=“.concat(type)));
}
/**
?*?Builds?upload?URL?by?type.
?*
?*?@param?type?current?type.
?*?@return?full?CKFinder?upload?URL.
?*/
private?String?buildUploadUrl(final?String?type)?{
if?(pageContext.getRequest()?instanceof?HttpServletRequest)?{
return?((HttpServletRequest)?pageContext.getRequest()).getContextPath().concat(CKFINDER_UPLOAD_URL).concat(typ
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????574??2014-11-28?09:59??代碼\itheima1128elec\.classpath
?????文件????????548??2014-11-29?14:48??代碼\itheima1128elec\.externalToolBuilders\org.eclipse.wst.jsdt.core.ja
?????文件????????547??2014-11-29?14:48??代碼\itheima1128elec\.externalToolBuilders\org.eclipse.wst.validation.validationbuilder?(4).launch
?????文件????????318??2014-11-28?10:09??代碼\itheima1128elec\.myme
?????文件???????2360??2014-11-29?22:32??代碼\itheima1128elec\.project
?????文件????????500??2014-11-28?09:53??代碼\itheima1128elec\.settings\.jsdtscope
?????文件???????1040??2014-11-28?10:09??代碼\itheima1128elec\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件????????395??2014-11-28?09:52??代碼\itheima1128elec\.settings\org.eclipse.jdt.core.prefs
?????文件????????560??2014-11-28?10:09??代碼\itheima1128elec\.settings\org.eclipse.wst.common.component
?????文件????????252??2014-11-28?09:53??代碼\itheima1128elec\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2014-11-28?09:53??代碼\itheima1128elec\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2014-11-28?09:53??代碼\itheima1128elec\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件???????5268??2014-12-06?09:07??代碼\itheima1128elec\build.xm
?????文件???????4541??2014-12-01?15:00??代碼\itheima1128elec\config\beans.xm
?????文件????????482??2014-12-06?11:06??代碼\itheima1128elec\config\ehcache.xm
?????文件?????????43??2014-12-08?15:05??代碼\itheima1128elec\config\ext.dic
?????文件???????2468??2014-12-08?10:44??代碼\itheima1128elec\config\hibernate.cfg.xm
?????文件????????414??2014-12-08?15:02??代碼\itheima1128elec\config\IKAnalyzer.cfg.xm
?????文件???????2247??2014-12-05?16:23??代碼\itheima1128elec\config\log4j.properties
?????文件????????178??2014-12-08?15:06??代碼\itheima1128elec\config\stopword.dic
?????文件???????7466??2014-12-10?11:17??代碼\itheima1128elec\config\struts.xm
?????文件???????3656??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\CKFinderSetupCKEditor.java
?????文件???????9985??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\CKFinderTag.java
?????文件??????32700??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\Configuration.java
?????文件???????5488??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\ConfigurationFactory.java
?????文件???????1952??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\ConfigurationPathBuilder.java
?????文件???????3534??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\Constants.java
?????文件???????1642??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\DefaultPathBuilder.java
?????文件???????3403??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\Events.java
?????文件????????902??2014-11-29?14:46??代碼\itheima1128elec\src\com\ckfinder\connector\configuration\Iba
............此處省略1443個文件信息
評論
共有 條評論