How to setup FCKeditor web application within Web Server 7

Some one asked a question in our forum today as how to configure FCKeditor within Web Server. Now, if  you are wondering as to what is FCKeditor - FCKeditor is an open source WYSIWYG text editor that can be used within web pages and you can check out a demo from FCKeditor's web site.

Here, I will show how to leverage the JSP integration plugin that comes with FCKeditor and deploy it as a Java web application so that web programmers can simply invoke this nice WYSIWYG text editor within their JSP / JSTL pages without the complexity of using a Java scriptlets or the JavaScript API.

Okay, here we go -

- If you haven't already, you can download and install Sun Web Server 7 from here

- Now, me being a command line person, I am leveraging Web Server 7 Administration server's command line interface here. If command line is not your cup of tea, you can also use the administration GUI  (browser based) to do these steps.

Note: This below step is very much optional. Web Server 7 installation provides you with a default configuration. You can choose to use the already existing configuration, if you prefer so.

Let us start the Administration Server and create a new configuration cum instance here. For testing purposes, in this example, I am creating a new configuration to run this server at port 80 on my local machine(sriramn)

C:\\Program Files\\Sun\\WebServer7> admin-server\\bin\\startserv.bat

C:\\Program Files\\Sun\\WebServer7> bin\\wadm create-config --user=admin  --http-port=80 --server-name=sriramn.red.iplanet.com fckeditor

C:\\Program Files\\Sun\\WebServer7> bin\\wadm create-instance --user=admin  --config=fckeditor sriramn.red.iplanet.com

- Download the latest version of FCKeditor JSP Integration Pack from following this URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511

- Now, create and change to a new directory 'FCKeditor' in your system (say C:\\FCKeditor in my case) and use an appropriate tool to unzip the downloaded JSP Integration Pack from the following URL:

mkdir C:\\FCKeditor

cd  C:\\FCKeditor

unzip c:\\downloads\\FCKeditor-2.3.zip

Moving on - FCKeditor JSP Integration Pack that we just unzipped in C:\\FCKeditor, doesn't include the core of the editor. So, we will need to download the core FCKeditor (written using JavaScript) from the following URL:
http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=75845

 So, download and unpack the content of the FCKeditor core files from the above URL inside "FCKeditor\\web" folder.

cd  C:\\FCKeditor\\web

unzip C:\\downloads\\FCKeditor_2.5b.zip 

The FCKeditor core zip file that we just unpacked under C:\\FCKeditor\\web creates another FCKeditor directory underneath containing the core files within 'editor' subdirectory. Since, we are interested only in this 'editor' subdirectory from this FCKeditor core zip file, let us move this 'editor' sub directory to JSP Integration Pack location (C:\\FCKeditor\\web in my case).

cd C:\\FCKeditor\\web\\FCKeditor

move editor C:\\FCKeditor\\web

Now, we will have to simply use Web Server 7 Administration Server to deploy this C:\\FCKeditor\\web as as web application within Web Server 7 with context root as 'FCKeditor' . Finally, start this server instance 'https-fckeditor' and point your browser to http://hostname/FCKeditor/_samples/index.jsp for the list of the samples.   

C:\\Program Files\\Sun\\WebServer7>bin\\wadm add-webapp --user=admin --uri=/FCKeditor --vs=fckeditor --file-on-server --config=fckeditor --directory=c:/FCKeditor/web c:\\FCKeditor\\web

C:\\Program Files\\Sun\\WebServer7>bin\\wadm deploy-config --user=admin fckeditor

C:\\Program Files\\Sun\\WebServer7>bin\\wadm start-instance --config=fckeditor sriramn.red.iplanet.com

Now, if you are a web programmer wondering for some tips on how to use this rich HTML text editor within your web page, please check out the FCKeditor's Developer Guide.

Please try it out and tell us what you think .

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Sharing what little I know

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today