`
fini
  • 浏览: 14797 次
  • 性别: Icon_minigender_1
  • 来自: 长春
社区版块
存档分类
最新评论
文章列表
textarea内容中的空格和换行无法存储到数据库中,所以在显示页面textarea内容时不换行。解决方法是在存入数据库之前,将“ ”“\n\r”替换成&nbsp; <br>   stringObj.replace(" ", "&nbsp;").replace("\r\n", "<br>")    
在配置资源文件的时候我们经常会遇到转码问题,其实jdk中本身就已经包含了转码工具 native2ascii.exe。下面就其使用方法做一个简单说明:在dos下面执行{native2ascii 源文件 目标文件}就可以完成转码。。。。反编码也很方便native2ascii -reverse  原文件 目标文件
文件上传使用<s:file>标签,表单的method为post,enctype为multipart/form-data   <s:form action="SupplyAdd" method="post" theme="simple" enctype="multipart/form-data"> <s:file name="productImage"/> </s:form>   <s:file name="xxx&q ...
将下载好的struts2-dojo-plugin-2.1.6.jar导入WEB-INF/lib   在web.xml中增加 <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/struts/*</url-pattern> </filter-mapping>   在jsp页面上   引用标签   <%@ taglib prefix="sd" uri="/struts-dojo-tags ...
一、find(String queryString);      示例:this.getHibernateTemplate().find("from bean.User");      返回所有User对象 二、find(String queryString , Object value);      示例:this.getHibernateTemplate().find("from bean.User u where u.name=?", "test&quo ...
var jsonString = request.responseText;   取json格式字符串   var jsonObject = eval("("+jsonString +")");    生成Json对象   jsonObject.成员名.length;    成员中数组个数   jsonData.成员名[i].对象名   取单个值
出现这种情况是在使用json-plugin时,一些不需要串行化的属性被序列化了 比如spring 注入的 services生成了getter、序列化ID生成了getter等等 ,json plugin会把有getter方法的属性序列化,格式化为json串 。解决办法:可以去掉getter或者在getter上加上@JSON(serialize=false)
首先在http://code.google.com/p/jsonplugin/downloads/list下载jsonplugin-0.34.jar 之后将jsonplugin-0.34.jar放入WEB-INF/lib中   之后使用prototype.js   Action代码   package com.platform.Action.SDCategory; import java.util.HashMap; import java.util.Map; import com.googlecode.jsonplugin.annotations.JSON; imp ...
修改Tomcat配置文件Tomcat 6.0/conf/server.xml <Connector port="8080" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>  
hibernate的xxx.hbm.xml映射文件中,自增的字段缺少 <generator class="increment"></generator>   造成。
首先下载FCKeditor2.6和FCKeditor.Java,解压后分别为fckeditor2.6和FCKeditor-2.3。 在项目中新建文件夹FCKeditor,然后将解压后的fckeditor2.6下的editor文件夹中fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml拷贝到FCKeditor目录下,然后将解压后的FCKeditor-2.3文件夹中web/WEB-INF/lib下的FCKeditor-2.3.jar拷贝到项目的lib中。 将FCKeditor-2.3文件夹下src下的FCKeditor.tld拷贝到test ...
Global site tag (gtag.js) - Google Analytics