Update of /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/_jsp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6026/phpslash-dev/public_html/scripts/fckeditor/_jsp
Added Files:
README.txt build.xml
Log Message:
complete fckeditor addition
--- NEW FILE: README.txt ---
-------------------------------------------------
FCKEditor 2.0b - JSP Integration Pack
-------------------------------------------------
---------------
Contents:
---------------
1 - Preface
2 - Installation
3 - Usage
4 - Building
5 - Future plans
6 - Further information and support
--------------------
1 - Preface
--------------------
This is the JSP Integration Pack for using FCKeditor inside a java server page without
the complexity of using a Java scriptlets or the javascript api.
I hope you find it usefull.
--------------------
2 - Installation
--------------------
Installing FCKeditor in a JSP environment is quite easy:
- First install the FCKeditor as described in the _documentation/Using FCKeditor/Javascript.html file
- Copy the files in the _jsp/dist directory in the WEB-INF dir of your web application
(the jar file in WEB-INF/lib and the tld in WEB_INF/)
- Add in your web.xml the following servlet configuration:
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
</servlet-mapping>
- Put in the FCKconfig.js the following configuration:
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector";
- Now you can start using the _samples/jsp/sample01.jsp and _samples/jsp/sample02_tag.jsp to test the JSP integration
--------------------
3 - Usage
--------------------
Take a look at the test files and in the javadoc api provided in the distribution.
Anyway, for the lazy ones, here is a simple example
First put this taglib definiton at the top of the JSP page
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK" %>
then the tag:
<FCK:editor
id="EditorAccessibility" //Unique name of the editor
width="80%" //Width
height="120" //Height
toolbarSet="Accessibility" //Toolbar name
>This is another test. <BR><B>The "Second" row.</B></FCK:editor>
A more advance example, that show how to use the inner tags to overrides any of the settings specified in
the config.js file
<FCK:editor id="EditorDefault" basePath="/FCKeditor/">
<FCK:config name="StyleNames" value="Style 1;Style 2; Style 3" />
<FCK:config name="FontNames" value="Arial;Courier New;Times New Roman;Verdana" />
This is some <B>sample text</B>.
</FCK:editor>
--------------------
4 - Building
--------------------
Inside the _jsp directory there are the source files for the tags (_jsp/src) and the ant build file (build.xml)
The ant build file provides the following tasks:
- all: Clean build and dist directories, then compile
- clean: Delete old build and dist directories
- compile: Compile Java sources
- dist: Create binary distribution
- javadoc: Create Javadoc API documentation
- release: Create Release Distribution
To start building the class you first need to modify the "catalina.home" property inside the build.xml,
then type "ant dist" to compile, create the javadoc API description and generate the jar library to be copied in the WEB-INF
--------------------
5 - Future plans
--------------------
* Provide the ability to pass a Map of advanced configuration instead of using the inner tags
* Integrate with Struts (so that FCKeditor can retrive and pass informations from Form Beans)
--------------------
6 - Further informations and support
--------------------
For further informations refers to http://www.fckeditor.net/
For support specific with this JSP integration taglib send an email to si...@us...
--- NEW FILE: build.xml ---
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: build.xml
* Ant Build script.
*
* Version: 2.0 Beta 1
* Modified: 2004-05-30 22:31:14
*
* File Authors:
* Simone Chiaretta (si...@pi...)
-->
<!--
General purpose build script for web applications and web services,
including enhanced support for deploying directly to a Tomcat 5
based server.
This build script assumes that the source code of your web application
is organized into the following subdirectories underneath the source
code directory from which you execute the build script:
docs Static documentation files to be copied to
the "docs" subdirectory of your distribution.
src Java source code (and associated resource files)
to be compiled to the "WEB-INF/classes"
subdirectory of your web applicaiton.
$Id: build.xml,v 1.1 2004/10/29 15:22:47 joestewart Exp $
-->
<!-- A "project" describes a set of targets that may be requested
when Ant is executed. The "default" attribute defines the
target which is executed if no specific target is requested,
and the "basedir" attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
-->
<project name="FCKeditor" default="compile" basedir=".">
<!-- ===================== Property Definitions =========================== -->
<!--
Each of the following properties are used in the build script.
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the "ant" command line (ant -Dfoo=bar compile).
* Definitions from a "build.properties" file in the top level
source directory of this application.
* Definitions from a "build.properties" file in the developer's
home directory.
* Default definitions in this build.xml file.
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
"build.properties" files as well as in the "build.xml" script.
-->
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<!-- ==================== File and Directory Names ======================== -->
<!--
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs.
app.name Base name of this application, used to
construct filenames and directories.
Defaults to "myapp".
app.path Context path to which this application should be
deployed (defaults to "/" plus the value of the
"app.name" property).
app.version Version number of this iteration of the application.
build.home The directory into which the "prepare" and
"compile" targets will generate their output.
Defaults to "build".
catalina.home The directory in which you have installed
a binary distribution of Tomcat 5. This will
be used by the "deploy" target.
dist.home The name of the base directory in which
distribution files are created.
Defaults to "dist".
-->
<property name="app.name" value="FCKEditor"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="2.0b"/>
<property name="build.home" value="${basedir}/build"/>
<!--<property name="catalina.home" value="C:/Program Files/Apache Software Foundation/Tomcat 5.0"/>-->
<property name="catalina.home" value="C:/Programmi/Apache Software Foundation/Tomcat 5.0"/>
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${basedir}/docs"/>
<property name="src.home" value="${basedir}/src"/>
<property name="release.home" value="${basedir}/${app.name}-${app.version}"/>
<!-- ==================== Compilation Control Options ==================== -->
<!--
These properties control option settings on the Javac compiler when it
is invoked using the <javac> task.
compile.debug Should compilation include the debug option?
compile.deprecation Should compilation include the deprecation option?
compile.optimize Should compilation include the optimize option?
-->
<property name="compile.debug" value="false"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!-- ==================== Compilation Classpath =========================== -->
<!--
Rather than relying on the CLASSPATH environment variable, Ant includes
features that makes it easy to dynamically construct the classpath you
need for each compilation. The example below constructs the compile
classpath to include the servlet.jar file, as well as the other components
that Tomcat makes available to web applications automatically, plus anything
that you explicitly added.
-->
<path id="compile.classpath">
<!-- Include all elements that Tomcat exposes to applications -->
<pathelement location="${catalina.home}/common/classes"/>
<fileset dir="${catalina.home}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/shared/classes"/>
<fileset dir="${catalina.home}/shared/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- ==================== All Target ====================================== -->
<!--
The "all" target is a shortcut for running the "clean" target followed
by the "compile" target, to force a complete recompile.
-->
<target name="all" depends="clean,compile"
description="Clean build and dist directories, then compile"/>
<!-- ==================== Clean Target ==================================== -->
<!--
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
-->
<target name="clean"
description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<!-- ==================== Compile Target ================================== -->
<!--
The "compile" target transforms source files (from your "src" directory)
into object files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".
-->
<target name="compile"
description="Compile Java sources">
<!-- Compile Java classes as necessary -->
<mkdir dir="${build.home}/classes"/>
<javac srcdir="${src.home}"
destdir="${build.home}/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
</target>
<!-- ==================== Dist Target ===================================== -->
<!--
The "dist" target creates a binary distribution of your application
in a directory structure ready to be archived in a tar.gz or zip file.
Note that this target depends on two others:
* "compile" so that the entire web application (including external
dependencies) will have been assembled
* "javadoc" so that the application Javadocs will have been created
-->
<target name="dist" depends="compile,javadoc"
description="Create binary distribution">
<!-- Copy documentation subdirectories -->
<mkdir dir="${dist.home}/docs"/>
<copy todir="${dist.home}/docs">
<fileset dir="${docs.home}"/>
</copy>
<copy todir="${dist.home}">
<fileset file="${src.home}/FCKeditor.tld"/>
</copy>
<!-- Create application JAR file -->
<jar jarfile="${dist.home}/${app.name}-${app.version}.jar"
basedir="${build.home}/classes"/>
<!-- Copy additional files to ${dist.home} as necessary -->
<copy todir="${dist.home}">
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<!-- ==================== Javadoc Target ================================== -->
<!--
The "javadoc" target creates Javadoc API documentation for the Java
classes included in your application. Normally, this is only required
when preparing a distribution release, but is available as a separate
target in case the developer wants to create Javadocs independently.
-->
<target name="javadoc" depends="compile"
description="Create Javadoc API documentation">
<javadoc sourcepath="${src.home}"
destdir="${docs.home}/api"
packagenames="*">
<classpath refid="compile.classpath"/>
</javadoc>
</target>
<!-- ==================== Javadoc Target ================================== -->
<!--
The "javadoc" target creates Javadoc API documentation for the Java
classes included in your application. Normally, this is only required
when preparing a distribution release, but is available as a separate
target in case the developer wants to create Javadocs independently.
-->
<target name="release"
description="Create Release Distribution">
<mkdir dir="${release.home}"/>
<!-- Create application JAR file -->
<zip zipfile="${release.home}/${app.name}-${app.version}.zip"
basedir="${dist.home}"/>
</target>
</project>
|