先转载一篇simon1118的关于ewebeditor在线编辑器jsp版一些使用心得[url]http://www.iteye.com/topic/97537#326973[/url]
期间遇到几个问题:
1.提交content乱码 upload.js找到这句
2.输出时出现html标签 输出句改为
3.遇到老问题 java.sql.SQLException: ORA-01460: 转换请求无法实现或不合理
换成Oracle10g的classes12.jar
4.操作clob字段已经有很多精华帖了,直接当String保存就行,
5.eWebEditor.jsp报错
org.apache.jasper.JasperException: Exception in JSP: /eWebEditor.jsp:172
125:
126: </td> </tr>
127:
128: <% if(nStateFlag.equals("1")){ %>
129: <tr> <td height=25>
130:
131: <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%" class=StatusBar height=25>
原因:Unix环境不一样环境不一样
解决方法:
1.web.filename = config.getServletContext().getRealPath("/")+"WEB-INF/Style.xml";
web.filename2 = config.getServletContext().getRealPath("/")+"WEB-INF/Button.xml";
注意Style.xml,Button.xml大小写问题,发现图片文件无法上传,报一串乱码警告
2.把WEB-INF文件夹下Style.xml,Button.xml改成小写style.xml,button.xml,行了
5.文本编辑器内容为空时tomcat被关闭
解决方法:if(sTemp.equals(""))
{
System.exit(0);
} 改成if(sTemp.equals(""))
{
sTemp=" "}
期间遇到几个问题:
1.提交content乱码 upload.js找到这句
sContent=new String(request.getParameter("eWebEditor_UploadText").getBytes("iso8859-1"));
改成
sContent=new String(request.getParameter("eWebEditor_UploadText").getBytes("iso8859-1"),"UTF-8");
2.输出时出现html标签 输出句改为
<s:property value="news.content" escape="false" />
添加escape="false"
3.遇到老问题 java.sql.SQLException: ORA-01460: 转换请求无法实现或不合理
换成Oracle10g的classes12.jar
4.操作clob字段已经有很多精华帖了,直接当String保存就行,
<property name="content" type="text">
<column name="CONTENT" not-null="true">
<comment>正文</comment>
</column>
</property>
5.eWebEditor.jsp报错
org.apache.jasper.JasperException: Exception in JSP: /eWebEditor.jsp:172
125:
126: </td> </tr>
127:
128: <% if(nStateFlag.equals("1")){ %>
129: <tr> <td height=25>
130:
131: <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%" class=StatusBar height=25>
原因:Unix环境不一样环境不一样
解决方法:
1.web.filename = config.getServletContext().getRealPath("/")+"WEB-INF/Style.xml";
web.filename2 = config.getServletContext().getRealPath("/")+"WEB-INF/Button.xml";
注意Style.xml,Button.xml大小写问题,发现图片文件无法上传,报一串乱码警告
2.把WEB-INF文件夹下Style.xml,Button.xml改成小写style.xml,button.xml,行了
5.文本编辑器内容为空时tomcat被关闭
解决方法:if(sTemp.equals(""))
{
System.exit(0);
} 改成if(sTemp.equals(""))
{
sTemp=" "}