140227项目开发及上线过程遇到的10个问题(重点: FCK过滤替换)

1.替换条件判断问题

String s = (String)map2.get("contentIntro");
if(s != null && s.length() > 0){  }            //判断字符长度~!!

2.FCK过滤table格式不正确的文本内容, 动态+FCK+模板实现在线编辑器的更好运用。(运用fck上传图片功能。) <!--保养项目替换区域--> <!--技术力量替换区域--> <!--硬件设施替换区域--> <!--环境设施替换区域-->

环境设施替换区域

<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>                </tbody></table>

硬件设施替换区域

<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>

      </tbody></table>

技术力量替换区域

<table width="260" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>       </tbody></table>

保养项目替换区域 

保养项目替换区域
<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody><tr><th colspan="2">服务项目</th><th>能否提供</th></tr>
                  
                  </tbody></table>

-->完整html替换解决方案。 ---如果替换从tr开始,而不是从table开始,奇怪的是fck会将提交的如 保养项目替换区域,过滤掉。 

<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>         环境设施替换区域       </tbody></table>

-->经过fck提交,变成了

<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>      </tbody></table>

-->最后解决方法,环境设施替换区域

-->经过fck提交,仍然是 环境设施替换区域

-->在程序中替换,从table开始,而不是先前的从tr开始。

-------------------------------------------------------- 另外一个问题是--------------------------------------------------------

<table width="500" cellspacing="1" cellpadding="0" border="1" align="center" class="tabs"><tbody>
                    <!--环境设施替换区域-->
               </tbody></table>

这样也会被过滤掉~! 就算直接写成<!--环境设施替换区域-->   同样也被过滤掉了~!

FCKConfig.ProcessHTMLEntities = true ;

FCKConfig.FullPage = false ;

3.fck加载顺序问题。在线编辑器上传图片,本地eclipse容器clean之后都没有了。

http://localhost:8080/BNCAR2/UserFiles/Image/huayuan/11.jpg

-->fck放在最后面可以正常显示出来。

4.修改的时候,需要将id值隐藏,然后在form中以隐藏域的方式传递 id传递

<input type="hidden" name="id" id="id" value="<%=request.getParameter("id")%>"/>

5.修改成功之后,跳转到原来的页面,如果没有跳转,仅仅alert之后,就变成了空白页面。

out.print("<script>"
                        + "alert('服务商修改成功');"
//                        + "window.location.href='"+basePath+"/netWorkList';"
                        + "history.go(-1);"
                        + "</script>");

修改成功后返回空白页面~!! 返回上一页处理方式。

6.jquery ajax发送的json数据与接收端的数量不一致,不匹配。

com.google.gson.JsonParseException: The JsonDeserializer StringTypeAdapter failed to deserialized json object {} given the type class java.lang.String 

发送的字段不匹配~!!

7.frame框架的top,left,right页面,将right做成一个静态的页面,否则分配不同的权限,left菜单不一样,进来的right不能固定为某个动态链接。

奥迪图片 汽车养护知识:开热风快速散发车内异味 http://dealer.bitauto.com/100026180/news/201308/6062206.html    right.png

8.session取id问题。

netWorkLogin.getSysloginDTO().getId()   -->  netWorkLoginId

9.本地数据库与服务器数据库字段保持一致,否则会报错。(商家商品库模块)

///////////////////////////////////////
tbl_nw_network_partsinfo
updown 0上架,1下架
op_date
flag  0
///////////////////////////////////////  上下架,删除功能. 140224

10.jquery.cityselect.js文件的域名修改,本地与服务器上面不同,否则导致省市区调用不出来。

---------------链接其他项目上线需要修改的地方---------------
10.1    bn-context-test.properties  系统配置文件
10.2    jdbc-ds.properties         数据库配置,spy注释,maxActive=500
10.3    log4j.properties           日志文件的物理路径
10.4    web.xml                    session时间
原文地址:https://www.cnblogs.com/simpledev/p/3572986.html