zoukankan      html  css  js  c++  java
  • J2EE学习笔记——JSP使用Fckeditor

    首先需要下载      FCKeditor_2.6.10    这里是文件夹形式   

                 和下载     FCKidetor  所用的jar 包      在这里下载                  点击打开链接下载jar包



    上项目截图:



    一、FCK配置

    1、解压FCKidetor  所用的jar 包  (上面下载的)后,将jar包导入至工程的lib中;

    2、FCKeditor_2.6.10.zip解压后,将fckeditor文件夹整个拷贝至WebRoot下。

    index.jsp代码:


    <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>FckEditor</title>
    </head>
    
    <body>
    <h2 align="center">FckEdit</h2>
    <hr>
        <form action="SaveFckServlet" method="post">
          <FCK:editor instanceName="content" height="500px" width="600px">
           
          
          </FCK:editor>  
          
          <input type="submit" value="提交 ">
            
            
            
            
         </form>
    </body>
    </html>



    servlet后台获取 FCKeditor里的值   用  :String path=request.getParameter("content");  


    注意:参数一定是  content      前台  也要写成   

     <FCK:editor instanceName="content" height="500px" width="600px">

    除非  你修改FCK 里的JS  文件 中content对应的内容  ,否则 就用     <FCK:editor instanceName="content"

    
    

    不然取不到值 。


    注意:FCKeditor_2.6.10   不需要配置 web.xml 文件       (有很多资料配置了  ,我亲自试了 配置反倒不对)

  • 相关阅读:
    InjectAPC全部项目(Win32和Win64位)
    Codeforces Round #377 (Div. 2)
    Codeforces Canada Cup 2016
    UVa 1395 (最小生成树)
    空间表SpaceList
    线程中的临界区的应用
    【题解】狼和羊-C++
    【基础算法-树状数组】入门-C++
    【题解】在你窗外闪耀的星星-C++
    【题解】[NOIP模拟题]我要的幸福-C++
  • 原文地址:https://www.cnblogs.com/javawebsoa/p/3069649.html
Copyright © 2011-2022 走看看