<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK"%>
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
<%@ page language="java" import="net.fckeditor.*"%>
<html>
<head>
<title>Welcome</title> </head>
<body>
<form name="form1" action='success.jsp' method="post">
第一种方式
<FCK:editor id="content" width="80%" height="320"
fontNames="宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier
New;Tahoma;Times New Roman;Verdana"
imageBrowserURL="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html?
Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html?
Connector=connectors/jsp/connector"
flashBrowserURL="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html?
Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> </FCK:editor> <br>
第二种方式
<textarea id="content" name="content"
style="WIDTH: 100%; HEIGHT: 400px">input</textarea>
<script type="text/javascript">
var oFCKeditor = new FCKeditor('content') ;
oFCKeditor.BasePath = "/fcktest/FCKeditor/" ;
oFCKeditor.Height = 400;
oFCKeditor.ToolbarSet = "Default" ;
oFCKeditor.ReplaceTextarea();
</script>
<br>
第三种方式
<%
FCKeditor oFCKeditor;
oFCKeditor = new FCKeditor(request, "content");
oFCKeditor.setBasePath("/fcktest/FCKeditor/");
oFCKeditor.setValue("input");
out.println(oFCKeditor.createHtml());
%> <input type="submit" name="SubM" value="发表" />
</form>
</body>
</html>
第一种和第二种出错
第三种正确的
第一种出错信息:/index.jsp(12,3) According to the TLD or the tag file, attribute instanceName is mandatory for tag editor
第二种出错信息是找不到FCKeditor这个js对象
我在页面导入了相应的js和tld标签,在eclipse都能点进去
都有对应的信息,为什么说找不到js对象或对应标签呢?
解决方案 »
- struts2 的validate="true" 所生成的javascript问题
- request.setCharacterEncoding跟response的区别
- 电信彩信,用axis开发,如何添加多个附件
- Action问题
- hibernate getCurrentSession和openSession的疑惑
- Axis 安全 JAVA 反序列化 问题 2
- ejb2.0 sessionBean调用cmp实体bean出现的奇怪问题
- 上海某软件有限公司招聘WEB,JAVA工程师(紧急)
- 在struct中,在一个action中想读取一个.xml文件,该把给.xml文件放到什么位置呢?
- 我是ejb新手,谁能帮小弟解释此ejb问题,我给你磕头了。
- action里如何写出一个文件?
- 如何区别多个文本框
Line:18
Char:4
Code:0
Error:'FCKeditor' 未定义
网址:http://localhost:8080/fcktest/index.jsp
下载 fckeditor-java-demo-2.4.war
2 拷贝到tomcat的webapp下直接运行3 拷贝fckeditor和userfiles文件夹到项目4 拷贝WEB-INF\lib下的jar包到项目5 web.xml内容拷贝 <servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
net.fckeditor.connector.ConnectorServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet> <servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/fckeditor/editor/filemanager/connectors/*
</url-pattern>
</servlet-mapping>
6 拷贝WEB-INF\classes下的文件fckeditor.properties到classpath下,这里默认配置的是用户权限的属性,如果不设置会提示"the current user isn't ..........."7 对demo1.jsp进行内容拷贝!