Java

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

This page is obsolete and applies to FCKeditor.Java 2.3 only. Visit this website for the new documentation.

It is so easy to use FCKeditor in your Java/JSP web pages. Just download the JSP Integration Pack for using FCKeditor inside a java server page without the complexity of using a Java scriptlets or the JavaScript API.

Configuring your site

Step 1

First step you should take in order to integrate FCKeditor with you page is downloading the latest version of the JSP Integration Pack from from our download site.You can find the latest version of the package under this address:

http://www.fckeditor.net/download

Note: The main code is not included in this package, just the JSP Integration Pack. You still need the FCKeditor scripts to be able to run it, so you should download it as well

Step 2

  • Unpack the Java Integration Library in a directory named "fckeditor".
  • Unzip the content of the FCKeditor release of your choice inside the "fckeditor\web" folder.

Integration

Step 1

Create in tomcat (or any servlet container) a new context named "FCKeditor" that points to the previously created "fckeditor\web" folder.

Sample code

<%@ page language="java" import="com.fredck.FCKeditor.*" %>
<html>
<head>
<title>FCKeditor - JSP Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
window.status = editorInstance.Description ;
}
</script>
</head>
<body>
<form action="sampleposteddata.jsp" method="get" target="_blank">

<%
FCKeditor oFCKeditor ;
oFCKeditor = new FCKeditor( request, "EditorDefault" ) ;
oFCKeditor.setBasePath( "/fckeditor/" ) ;
oFCKeditor.setValue( "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>." );
out.println( oFCKeditor.create() ) ;
%>

<input type="submit" value="Submit">
</form>
</body>
</html>

Additional information

This page was last edited on 6 July 2008, at 01:25.