﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-藏经阁-文章分类-CKEditor</title><link>http://www.blogjava.net/zhouf/category/45703.html</link><description /><language>zh-cn</language><lastBuildDate>Sun, 25 Jul 2010 15:37:24 GMT</lastBuildDate><pubDate>Sun, 25 Jul 2010 15:37:24 GMT</pubDate><ttl>60</ttl><item><title>CKeditor3.3配置记录</title><link>http://www.blogjava.net/zhouf/articles/322282.html</link><dc:creator>ZhouFeng</dc:creator><author>ZhouFeng</author><pubDate>Sun, 30 May 2010 16:30:00 GMT</pubDate><guid>http://www.blogjava.net/zhouf/articles/322282.html</guid><wfw:comment>http://www.blogjava.net/zhouf/comments/322282.html</wfw:comment><comments>http://www.blogjava.net/zhouf/articles/322282.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/zhouf/comments/commentRss/322282.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhouf/services/trackbacks/322282.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 记录新的CKEditor3.3的一些配置,以及中文问题的处理&nbsp;&nbsp;<a href='http://www.blogjava.net/zhouf/articles/322282.html'>阅读全文</a><img src ="http://www.blogjava.net/zhouf/aggbug/322282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhouf/" target="_blank">ZhouFeng</a> 2010-05-31 00:30 <a href="http://www.blogjava.net/zhouf/articles/322282.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>搞定FCKeditor2.6.4上传中文图片的问题</title><link>http://www.blogjava.net/zhouf/articles/279808.html</link><dc:creator>ZhouFeng</dc:creator><author>ZhouFeng</author><pubDate>Wed, 03 Jun 2009 06:41:00 GMT</pubDate><guid>http://www.blogjava.net/zhouf/articles/279808.html</guid><wfw:comment>http://www.blogjava.net/zhouf/comments/279808.html</wfw:comment><comments>http://www.blogjava.net/zhouf/articles/279808.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zhouf/comments/commentRss/279808.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhouf/services/trackbacks/279808.html</trackback:ping><description><![CDATA[昨天配置好了FCKeditor,可以上传图片和文件了,可有一个问题还没有解决,那就是上传中文图片的时候会出现乱码,我的工程里用的编码都是UTF-8的,在网上找了好些资料,都搞不定,最后下载了<a href="http://sourceforge.net/project/showfiles.php?group_id=75348&amp;package_id=129511">fckeditor-java-2.4.1-src.zip</a>(在http://www.fckeditor.net/download上也有下载).解压缩之后,把源文件部署到工程里,可启动老是报错,不知道是啥回事儿,后来换成了手动的,操作如下<br />
找到源文件中的 net.fckeditor.connector.ConnectorServlet.java,将其中的部分代码改掉,我们先搞定图片中文问题,需要做如下修改,大概在240多行的位置<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 0);">String&nbsp;newFilename&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />
FileItemFactory&nbsp;factory&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;DiskFileItemFactory();<br />
ServletFileUpload&nbsp;upload&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;ServletFileUpload(factory);<br />
</span></div>
在其后添加一行,指定编码为UTF-8的格式,如下<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 0);">String&nbsp;newFilename&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />
FileItemFactory&nbsp;factory&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;DiskFileItemFactory();<br />
ServletFileUpload&nbsp;upload&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;ServletFileUpload(factory);<br />
upload.setHeaderEncoding(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF-8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />
</span></div>
代码是改掉了,可怎么部署到应用里面呢,前面有说到,直接将java源文件放在工程里编译启动里会报错,不知道是我哪里没弄好还是怎么回事,反正也没去折腾了,改用土办法<br />
解压fckeditor-java-core-2.4.1.jar里面的class放在WEB-INF/classes下,然后手工将新生成的ConnectorServlet.class文件替换掉 WEB-INF/classes/net/fckeditor/connector/ConnectorServlet.class ,再启动服务器,如果没有报错的话,中文图片的上传问题就能搞定了<br />
<br />
今天为了解决这个问题查了一天的资料,也顺便看了很多文档,好像是FCKeditor2.4之后可以配置上传文件自动重命名的地方,我只看到一篇文档上提到过一次,在官方网站上也没有找到相关的说明,也就不去找什么配置了,反正源代码已经改动过了,不如把重命名也一起改了,找到net.fckeditor.connector.ConnectorServlet.java大概250行左右<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;We&nbsp;upload&nbsp;only&nbsp;one&nbsp;file&nbsp;at&nbsp;the&nbsp;same&nbsp;time</span><span style="color: rgb(0, 128, 0);"><br />
</span><span style="color: rgb(0, 0, 0);">FileItem&nbsp;uplFile&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;items.get(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">);<br />
String&nbsp;rawName&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;UtilsFile.sanitizeFileName(uplFile.getName());<br />
String&nbsp;filename&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;FilenameUtils.getName(rawName);<br />
String&nbsp;baseName&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;FilenameUtils.removeExtension(filename);<br />
String&nbsp;extension&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;FilenameUtils.getExtension(filename);<br />
</span></div>
将上面的代码改为<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;We&nbsp;upload&nbsp;only&nbsp;one&nbsp;file&nbsp;at&nbsp;the&nbsp;same&nbsp;time</span><span style="color: rgb(0, 128, 0);"><br />
</span><span style="color: rgb(0, 0, 0);">FileItem&nbsp;uplFile&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;items.get(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">);<br />
String&nbsp;rawName&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;UtilsFile.sanitizeFileName(uplFile.getName());<br />
<br />
String&nbsp;randTimer&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;String.valueOf(Calendar.getInstance().getTimeInMillis());<br />
String&nbsp;randVal&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;String.valueOf(Math.abs((</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Random()).nextInt()));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
String&nbsp;filename&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;FilenameUtils.getName(rawName);<br />
String&nbsp;baseName&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;randTimer&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;randVal;<br />
String&nbsp;extension&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;FilenameUtils.getExtension(filename);<br />
filename&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;baseName.concat(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).concat(extension);</span></div>
即可,此处我是用时间的毫秒串再加上一个随机数串构成的新文件名,当然也可以改成你自己喜欢的格式,如将毫秒改成日期时间字串,则只需修改<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 0);">String&nbsp;randTimer&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;SimpleDateFormat(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">yyyyMMddHHmmss</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)).format(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;Date());</span></div>
改好了之后,重新生成class文件,按照上面的做法部署到应用中去<br />
<br />
为了方便使用,可以把修改后的class文件重新做成jar包,将WEB-INF/classes下的net和org目录拷贝到一个新的空目录中,然后在命令提示符下转到该目录,用如下命令可以生成新的jar包<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 0);">jar -cvf&nbsp;fckeditor-java-</span><span style="color: rgb(0, 0, 0);">2.4.1</span><span style="color: rgb(0, 0, 0);">-rename.jar&nbsp;*.*</span></div>
此处为生成一个fckeditor-java-2.4.1-rename.jar,当然,名字可以自己定义<br />
<br />
上面的做法可能不是很先进,在Eclipse里也有打包jar的操作,也许更新一个java源文件不会是这么麻烦,但总算这样是搞定了,记录在这里先<br />
<img src ="http://www.blogjava.net/zhouf/aggbug/279808.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhouf/" target="_blank">ZhouFeng</a> 2009-06-03 14:41 <a href="http://www.blogjava.net/zhouf/articles/279808.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在JSP中配置FCKeditor 2.6.4</title><link>http://www.blogjava.net/zhouf/articles/279660.html</link><dc:creator>ZhouFeng</dc:creator><author>ZhouFeng</author><pubDate>Tue, 02 Jun 2009 09:42:00 GMT</pubDate><guid>http://www.blogjava.net/zhouf/articles/279660.html</guid><wfw:comment>http://www.blogjava.net/zhouf/comments/279660.html</wfw:comment><comments>http://www.blogjava.net/zhouf/articles/279660.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/zhouf/comments/commentRss/279660.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zhouf/services/trackbacks/279660.html</trackback:ping><description><![CDATA[1.FCKeditor 介绍<br />
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功能，.FCKeditor 支持当前流行的浏览器。<br />
<br />
2．准备工作：<br />
<br />
环境：winddows XP、tomcat6.0、JDK1.6<br />
下载：<br />
1)：FCKeditor_2.6.4.zip<br />
地址：http://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip<br />
<br />
2)：fckeditor-java-2.4.1-bin.zip (JAVA支持包)地址http://nchc.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-2.4.1-bin.zip<br />
<br />
3)：slf4j-1.5.2.zip 地址 ：http://www.slf4j.org/dist/slf4j-1.5.2.zip<br />
<br />
3.安装：<br />
<br />
下面以jsp为例：<br />
<br />
分别解压之后，我们可以得到一个fckeditor和fckeditor-java-2.4.1两个文件夹。fckeditor文件夹下是需要调用的页面和js文件等等，有各种版本，无所谓啦，我们之需要jsp就够了。将文件加全部复制到工程目录下等待调用即可。<br />
注意：有点麻烦的是导包的问题。我们一共需要5个包：commons-fileupload-1.2.1.jar，commons-io-1.3.2.jar，fckeditor-java-core-2.4.1.jar，slf4j-api-1.5.6.jar，slf4j-simple-1.5.6.jar或slf4j-jdk14-1.5.6.jar。<br />
上面前四个包都可以在fckeditor-java-2.4.1文件夹下面找到，但是第五个却要另外去找，这点我非常不理解，为什么不放在一起。<br />
如果没有的话编译时就会出现如下错误信息：<br />
严重: Servlet /fckeditorDemo threw load() exception<br />
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder<br />
<br />
<br />
<br />
当然版本或许不同，以上的版本是截止2009-02-4的最新版本。如果想要最新版本，可以在slf4j的官网http://www.slf4j.org/download.html下到。但是要注意，截止到2009-2-4，slf4j官方最新版本是1.5.6，但是fckeditor提供的slf4j-api却是1.5.2版本，如果两个版本不一样的话，你将会在控制台看到如下的消息：<br />
<br />
严重: Servlet /Java threw load() exception<br />
java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class<br />
<br />
org.slf4j.LoggerFactory<br />
<br />
<br />
<br />
所以千万要注意版本一致问题。如果你实在觉得下载很麻烦，那就到这里下载吧：http://www.slf4j.org/download.html<br />
<br />
<br />
4.配置<br />
<br />
1)在工程目录src/下新建一个文件fckeditor.properties，添加内容：<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 0);">connector.userFilesPath</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">UploadFile<br />
connector.userActionImpl</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">net.fckeditor.requestcycle.impl.UserActionImpl</span></div>
其中第一行为重新定义上传的文件夹,默认文件夹为userfile,保存即可。<br />
2)修改web.xml，用来提供上传功能支持<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">servlet</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">Connector</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">servlet-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;net.fckeditor.connector.ConnectorServlet&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">servlet-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">load-on-startup</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">load-on-startup</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">servlet</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">servlet-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">Connector</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">servlet-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/fckeditor/editor/filemanager/connectors/*&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">servlet-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
</span></div>
5.应用,建立一JSP文件如下<br />
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br />
<br />
Code highlighting produced by Actipro CodeHighlighter (freeware)<br />
http://www.CodeHighlighter.com/<br />
<br />
--><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">&lt;%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">@&nbsp;page&nbsp;language</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">java</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;import</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">java.util.*</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;pageEncoding</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">UTF-8</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%&gt;</span><span style="color: rgb(0, 0, 0);"><br />
</span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">&lt;%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">String</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;path&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;request.getContextPath();<br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">String</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;basePath&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;request.getScheme()</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">://</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">request.getServerName()</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">:</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">request.getServerPort()</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">path</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">+</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">/</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;<br />
<br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">String</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;content</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">request.getParameter(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">edt1</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;(content&nbsp;!</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">null</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">)&nbsp;{<br />
&nbsp;&nbsp;content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;content.replaceAll(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">\r\n</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">,&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">""</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
&nbsp;&nbsp;content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;content.replaceAll(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">\r</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">,&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">""</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
&nbsp;&nbsp;content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;content.replaceAll(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">\n</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">,&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">""</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
&nbsp;&nbsp;content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;content.replaceAll(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">\"",&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">'</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);">");</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0);"><br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">}</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">else</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">{<br />
&nbsp;&nbsp;content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">""</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;<br />
}<br />
<br />
</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">//</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">下面是处理中文内容的编码转换<br />
content&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">new</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">String</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">(content.getBytes(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">iso8859-1</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">),</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">utf-8</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
</span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<br />
</span><span style="color: rgb(0, 0, 255);">&lt;!</span><span style="color: rgb(255, 0, 255);">DOCTYPE&nbsp;HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">base&nbsp;</span><span style="color: rgb(255, 0, 0);">href</span><span style="color: rgb(0, 0, 255);">="&lt;%=basePath%&gt;"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">FCKEditor&nbsp;测试</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
<br />
&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">script&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="text/javascript"</span><span style="color: rgb(255, 0, 0);">&nbsp;src</span><span style="color: rgb(0, 0, 255);">="fckeditor/fckeditor.js"</span><span style="color: rgb(0, 0, 255);">&gt;&lt;/</span><span style="color: rgb(128, 0, 0);">script</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">body</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;my&nbsp;JSP&nbsp;page.&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">br</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">form&nbsp;</span><span style="color: rgb(255, 0, 0);">method</span><span style="color: rgb(0, 0, 255);">="post"</span><span style="color: rgb(255, 0, 0);">&nbsp;name</span><span style="color: rgb(0, 0, 255);">="frm1"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">script&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="text/javascript"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;oFCKeditor&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255);">new</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;FCKeditor(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">edt1</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oFCKeditor.BasePath&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">fckeditor/</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oFCKeditor.Height</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">'</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">400</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">';<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oFCKeditor.Value</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">&lt;%=content%&gt;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oFCKeditor.Create();<br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">script</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">input&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="submit"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="提交"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">form</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">hr</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">&lt;%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">content</span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%&gt;</span><span style="color: rgb(0, 0, 0);"><br />
&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">body</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br />
</span></div>
启动服务器,用浏览器访问即可看到结果<br />
<br />
今天折腾了一个下午,终于算是看到点效果了,便记录在这里,上面的内容在网上转了一部分,因为找不到原文出处,也就没有注明了<br />
<img src ="http://www.blogjava.net/zhouf/aggbug/279660.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zhouf/" target="_blank">ZhouFeng</a> 2009-06-02 17:42 <a href="http://www.blogjava.net/zhouf/articles/279660.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>