首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

jsp页面在线编辑有人用过ckedictor+ckfinder的没有

2014-01-08 
jsp页面在线编辑有人用过ckedictor+ckfinder的没?我使用ckedictor+ckfinder在线页面编辑,在本地测试好好地

jsp页面在线编辑有人用过ckedictor+ckfinder的没?
我使用ckedictor+ckfinder在线页面编辑,在本地测试好好地,图片什么功能都能实现,为什么上传到服务器后就不能实现上传图片功能了,大虾门帮忙看看怎么回事
web.xml配置
 <servlet>  
        <servlet-name>ConnectorServlet</servlet-name>  
        <servlet-class>com.ckfinder.connector.ConnectorServlet</servlet-class>  
        <init-param>  
            <param-name>XMLConfig</param-name>  
            <param-value>/WEB-INF/config.xml</param-value>  
        </init-param>  
        <init-param>  
            <param-name>debug</param-name>  
            <param-value>false</param-value>  
        </init-param>  
        <load-on-startup>1</load-on-startup>  
    </servlet>  
    <servlet-mapping>  
        <servlet-name>ConnectorServlet</servlet-name>  
        <url-pattern><!-- 注意这里的路径要和ckfinder的放置路径完全保持一致才行 -->  
            /ckfinder/core/connector/java/connector.java  
        </url-pattern>  
    </servlet-mapping>
      <session-config>
<session-timeout>10</session-timeout>
</session-config>
config.xml配置
<config>
<enabled>true</enabled>
<baseDir></baseDir>
<baseURL>yanjiusuo/uploadfile/</baseURL>  <span style="font-family:arial, sans-serif, verdana, helvetica;color:#404040;"><span style="font-size: 14px; line-height: 25px;"><!--这里改成自己想保存的路径就可以了--></span></span>
<licenseKey></licenseKey>
<licenseName></licenseName>
<imgWidth>1600</imgWidth>
<imgHeight>1200</imgHeight>
<imgQuality>80</imgQuality>
<uriEncoding>UTF-8</uriEncoding>
<forceASCII>false</forceASCII>
<userRoleSessionVar>CKFinder_UserRole</userRoleSessionVar>
<checkDoubleExtension>true</checkDoubleExtension>
<checkSizeAfterScaling>true</checkSizeAfterScaling>
<secureImageUploads>true</secureImageUploads>
<htmlExtensions>html,htm,xml,js</htmlExtensions>
<hideFolders>
<folder>.svn</folder>
<folder>CVS</folder>
</hideFolders>
<hideFiles>
<file>.*</file>
</hideFiles>
<defaultResourceTypes></defaultResourceTypes>
<types>
<type name="Files">
<url>%BASE_URL%files/</url>
<directory>%BASE_DIR%files</directory>
<maxSize>0</maxSize>
<allowedExtensions>7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip
</allowedExtensions>
<deniedExtensions></deniedExtensions>
</type>
<type name="Images">
<url>%BASE_URL%images/</url>
<directory>%BASE_DIR%images</directory>
<maxSize>0</maxSize>
<allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions>
<deniedExtensions></deniedExtensions>
</type>
<type name="Flash">
<url>%BASE_URL%flash/</url>
<directory>%BASE_DIR%flash</directory>
<maxSize>0</maxSize>
<allowedExtensions>swf,flv</allowedExtensions>
<deniedExtensions></deniedExtensions>
</type>
</types>
<accessControls>
<accessControl>
<role>*</role>
<resourceType>*</resourceType>
<folder>/</folder>
<folderView>true</folderView>
<folderCreate>true</folderCreate>
<folderRename>true</folderRename>
<folderDelete>true</folderDelete>
<fileView>true</fileView>
<fileUpload>true</fileUpload>
<fileRename>true</fileRename>
<fileDelete>true</fileDelete>
</accessControl>
</accessControls>
<thumbs>
<enabled>true</enabled>
<url>%BASE_URL%_thumbs/</url>
<directory>%BASE_DIR%_thumbs</directory>
<directAccess>false</directAccess>
<maxHeight>100</maxHeight>
<maxWidth>100</maxWidth>
<quality>80</quality>
</thumbs>
<plugins>
<plugin>
<name>imageresize</name>
<class>com.ckfinder.connector.plugins.ImageResize</class>


<params>
<param name="smallThumb" value="90x90"></param>
<param name="mediumThumb" value="120x120"></param>
<param name="largeThumb" value="180x180"></param>
</params>
</plugin>
<plugin>
<name>fileeditor</name>
<class>com.ckfinder.connector.plugins.FileEditor</class>
<params></params>
</plugin>
</plugins>
<basePathBuilderImpl>com.ckfinder.connector.configuration.ConfigurationPathBuilder</basePathBuilderImpl>
</config>
页面上的内容
<td>内容:<textarea rows="15" cols="60" id="onlineArticle.text" name="x.content"></textarea>  
<ckfinder:setupCKEditor basePath="ckfinder/" editor="onlineArticle.text" />  
<ckeditor:replace replace="onlineArticle.text" basePath="yanjiusuo/ckeditor/" />  
 
将baseUrl 设置成  http:// ip/yanjiusuo/uploadfile/ 试试 
还有就是ie, 你换chrom浏览器试试
 
ckfinder  ckeditor 最新版的话  是可以的  以前的貌似 对浏览器有选择。这个还没搞懂怎么弄。在看资料

热点排行