Hi,
I've gone through the tutorial on how to integrate FCKeditor with Java/JSP and got the samples to run.
I've also modified the samples a little and it runs as well.
The modification is such:
1) Directory/File Structure:
C:\webapps\domain.com\demo--+
--+WEB-INF
C:\webapps\editor--+
--+_samples
--+editor
--+WEB-INF
2) Tomcat server.xml
Added in the following tags
<Host name="demo.domain.com" appBase="C:\webapps\domain.com\demo">
<Context path="" reloadable="true" docBase="."/>
<Context path="/FCKeditor" reloadable="true" docBase="C:\webapps\editor"/>
</Host>
3) Windows host file
Added in the following line
127.0.0.1 demo.domain.com
The samples run fine when I key in demo.domain.com/FCKeditor/_samples/index.jsp (I run Tomcat on port 80) from my browser.
That done, I went one step further to try to use only one webapp (I used 2 webapps in the above modification). That is where the problem starts.
I noticed the examples were integrated with FCKeditor as a separate webapp.
For example this snippet taken from sample02.jsp,
<FCK:editor id="EditorDefault" basePath="/FCKeditor/"
imageBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
This is some <strong>sample text</strong>. You are using <a href="http://www.fredck.com/fckeditor/">FCKeditor</a>.
</FCK:editor>
It will only work if we use a context FCKeditor such as in http://www.domain.com/FCKeditor.
How do I configure such that we do not need to use a separate context?
Such as in my modification:
C:\webapps\domain.com\demo--+ (this will be the basePath of FCKeditor)
--+WEB-INF
--+editor
--+fckconfig.js
--+fckeditor.js
--+fckstyles.xml
--+fcktemplates.xml
I am trying to use the editor when I key in demo.domain.com in my browser instead of demo.domain.com/FCKeditor.
Best Regards,
KL
Tue, 01/16/2007 - 08:10
#1
RE: Help: integrate FCKeditor with Java/JSP
Perhaps someone who has configured FCKeditor correctly can point me in the right direction?
Thanks,
KL
RE: Help: integrate FCKeditor with Java/JSP
Hi all,
I guess the first post was too much of a read...
Basically I want to configure basePath of FCKeditor at the root of my hosted webapp, so that I am able to access my app and FCKeditor at http://www.domain.com
Directory structure will be like:
C:\webapps\domain.com\demo--+
--+WEB-INF
--+editor
--+fckconfig.js
--+fckeditor.js
--+fckstyles.xml
--+fcktemplates.xml
--+index.jsp
Tomcat config file server.xml
<Host name="demo.domain.com" appBase="C:\webapps\domain.com\demo">
<Context path="" reloadable="true" docBase="."/>
</Host>
And I can use the following Tag in my webapps's index.jsp
<FCK:editor id="EditorDefault" basePath="/"
imageBrowserURL="/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/editor/filemanager/upload/simpleuploader?Type=Flash">
This is some <strong>sample text</strong>. You are using <a href="http://www.fredck.com/fckeditor/">FCKeditor</a>.
</FCK:editor>
Thanks,
KL