<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 0, comments - 77, trackbacks - 0, articles - 356
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    FCKeditor_2.3.2 在線網頁編輯器(Java)

    Posted on 2007-06-10 15:44 semovy 閱讀(843) 評論(1)  編輯  收藏 所屬分類: J2EE綜合

    /******************************************
    *Author:Java619
    *Time:20070515
    *******************************************/

    首先下載相關文件

    FCKeditor_2.3.2.zip

    http://prdownloads.sourceforge.net/fckeditor/FCKeditor_2.3.2.zip?download

    FCKeditor-2.3 (for java)

    http://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor-2.3.zip

    1> 下載完成后,在J2EE應用中,建立項目:fcktest,在應用根目錄中建立文件夾FCKeditor,將FCKeditor中的editor目錄及 fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml文件拷貝到FCKeditor目錄下。

    2> 然后我們將FCKeditor-2.3\web\WEB-INF\lib中的兩個jar包拷貝到\fcktest\WEB-INF\lib目錄下,將 FCKeditor-2.3\src下的FCKeditor.tld拷貝到\fcktest\WEB-INF下。

    3> 編輯\fcktest\WEB-INF\web.xml文件,將FCKeditor-2.3\web\WEB-INF\web.xml里的內容合并到項目的\WEB-INF\目錄下的web.xml文件中,修改<servlet-mapping>里的內容為:

        <servlet-mapping>
          <servlet-name>Connector</servlet-name>
          <url-pattern>/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
        </servlet-mapping>
        
        <servlet-mapping>
          <servlet-name>SimpleUploader</servlet-name>
          <url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploader</url-pattern>
        </servlet-mapping>

     4>  修改合并后的web.xml文件,將名為SimpleUploader的Servlet的enabled參數值改為true,以允許上傳功能,Connector Servlet的baseDir參數值用于設置上傳文件存放的位置。
        并添加下面內容

       <taglib>
        <taglib-uri>/FCKeditor</taglib-uri>
        <taglib-location>/WEB-INF/FCKeditor.tld</taglib-location>
        </taglib>

    5>修改頁面fckconfig.js

    將FCKConfig.LinkBrowserURL等的值替換成以下內容:
    FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/jsp/connector' ;

    FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector';

    FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector' ;

    FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=File';

    FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Image';

    FCKConfig.FlashUploadURL = FCKConfig.BasePath +'filemanager/upload/simpleuploader?Type=Flash';

    6> 添加頁面 index.jsp

    <%@page contentType="text/html;charset=UTF-8"%>
    <%@page pageEncoding="UTF-8"%>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
            <script type="text/javascript" src="FCKeditor/fckeditor.js"></script>
        </head>
        <body>
            <form action="sampleposteddata.jsp" method="post" target="_blank">
            <table border="0" width="700"><tr><td>
            <textarea id="content" name="content" style="WIDTH: 100%; HEIGHT: 400px"></textarea>
            <script type="text/javascript">
            var oFCKeditor = new FCKeditor('content') ;
            oFCKeditor.BasePath = "FCKeditor/" ;
            oFCKeditor.Height = 400; 
            oFCKeditor.ReplaceTextarea();
            </script>
            <input type="submit" value="Submit">
            </td></tr></table>
          </form>
        </body>
    </html>

    7>  添加接受頁面sampleposteddata.jsp

    <%@ page contentType="text/html;charset=UTF-8"%>
          <%@ page language="java" import="java.util.*" %>
          <%
            Enumeration params = request.getParameterNames();
          %>
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
          <html>
            <head>
              <title>FCKeditor - Samples - Posted Data</title>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
              <meta name="robots" content="noindex, nofollow">
              <link href="../sample.css" rel="stylesheet" type="text/css" />
            </head>
            <body>
              <h1>FCKeditor中國的中 - Samples - Posted Data</h1>
              This page lists all data posted by the form.
              <hr>
              <table width="100%" border="1" cellspacing="0" bordercolor="#999999">
                <tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
                
      <td noWrap>Field Name&nbsp;&nbsp;</td>
                  <td>Value</td>
                </tr>
                <%
                String parameter = null ;
                while( params.hasMoreElements() )
                {
                  parameter = (String) params.nextElement() ;
                %>
                <tr>
                  <td valign="top" nowrap><b><%=parameter%></b></td>
                  <td width="100%"><%=request.getParameter(parameter)%></td>
                </tr>
                <%
                }
                %>
              </table>
            </body>
          </html>
         


    評論

    # re: FCKeditor_2.3.2 在線網頁編輯器(Java) [未登錄]  回復  更多評論   

    2010-12-03 15:23 by java
    如果我想把一個網頁的內容傳到FCKeditor里修改,該怎么傳參數?
    主站蜘蛛池模板: 亚洲人妻av伦理| ASS亚洲熟妇毛茸茸PICS| 亚洲a∨无码精品色午夜| 久久免费视频精品| 国产一区二区三区免费看| 亚洲一区二区三区深夜天堂| a级毛片免费高清毛片视频| 国产免费资源高清小视频在线观看| 久久亚洲AV成人无码国产| 四虎国产精品成人免费久久| 三年片在线观看免费大全| 精品亚洲一区二区| 成人精品国产亚洲欧洲| 亚洲国产精品免费视频| 浮力影院亚洲国产第一页| 亚洲JLZZJLZZ少妇| 97视频热人人精品免费| 亚洲av无码一区二区三区乱子伦| 免费大片黄在线观看| 黄网址在线永久免费观看 | 国产一级婬片A视频免费观看| 日本免费一区尤物| 国产色在线|亚洲| 1000部啪啪未满十八勿入免费| 国产精一品亚洲二区在线播放| 四虎精品免费永久免费视频| 日韩免费毛片视频| 亚洲一日韩欧美中文字幕在线| 四虎1515hh永久久免费| 中文字幕在线观看亚洲| 日韩免费无码视频一区二区三区| 亚洲精品国精品久久99热一| 国产成人高清精品免费观看| 亚洲人成人无码网www国产| 国产偷国产偷亚洲高清在线| 性做久久久久免费看| 亚洲国产精品成人综合色在线| 欧美在线看片A免费观看| 亚洲一区二区三区四区视频| 男女超爽刺激视频免费播放| 亚洲三级视频在线|