[心情日记]可怜的blog。。。
内容:
原来blog放的服务器坏了,数据拿不出来了。只好。。。
很多事情都是不小心,找不到数据。然后回到那里,继续原来的事情。
--------
偶比较喜欢这个风格,所以破例连作者的版权都不改了。。。
原来blog放的服务器坏了,数据拿不出来了。只好。。。
很多事情都是不小心,找不到数据。然后回到那里,继续原来的事情。
--------
偶比较喜欢这个风格,所以破例连作者的版权都不改了。。。
[空虚浪子心|空虚浪子心 |2005-11-1]
[没有分类]停止Sablog的开发!
内容:
sablog已经偏离了开发初衷,太臃肿了,而且骂声一片,我决定停止开发了,开发一个全新的Sablog,代号X,全称Sablog-X,没有什么特别意义,只是觉得好玩而已,或者叫ablog也好,精简大部分功能,全新数据结构,一切从头开始写。。。
其他的,没了。。。
[安全天使|...|2005-11-1]
[没有分类]2.8 Build 20051101 修正版发布
内容:
不记得修改了哪些文件了,只用上传所有PHP文件即可!
这几天一直都很忙,看了看大家反馈的一些问题,修正了一些,具体修正哪里,大家可以查看readme.htm文件。
2.8是一个功能比较完善的版本了。可能短期内都不会有新版本了,因为前段时间破了4、5个ZEND加密的商业版大型程序,所以这段时间要好好学习一点新技术,学习一些技巧,给Sablog来一个大型的手术,全部改写代码。全面提升效率。因此如果2.8修正版没有什么使用上的问题。就没有什么更新了。
值得注意的是升级后请手工把 ./admin/config.php 文件的 $usepconnect 变量改为“0”。
WAP插件也会尽快发布的。年底前。
还要说明几点
- 时区如果不同,只是文章的发表时间会相应变化,比如是放在国内的服务器,发表时间是8点,如果设置主要面向韩国用户,那么按照韩国的时间标准,发表时间就是显示9点,日历和统计还是按照服务器所在地区计算的。
- 没有设置时间修改功能,是当初考虑到没有必要。所以目前也没有考虑。
- 关于模板问题,因为被人对DIV+CSS一窍不通,所以还是TABLE的模板,也谢谢很多朋友的热心帮助。希望更多热心网友能作出更多更好的模板。
- 下个版本将全面转换为UTF8,乱码的问题就不会存在了。
- 数据库的效率和查询问题,还没有过多研究,因此我破解了几个ZEND过的商业论坛程序来学习学习。相信下个版本会更加完美的。
- 对于PHP5和MYSQL5的兼容性,相信在我充电后会解决的。
- 如果有谁愿意加入开发队伍。热烈欢迎。
最后再次谢谢各位朋友的支持!!!!!!
由于我的疏忽,没有把模板打包进去。10月31日18点之前下的朋友请从新下载!各位不好意思啊!呵呵
[安全天使|...|2005-10-31]
[没有分类]2.8修正版月底会放出
内容:
- 解决2.6->2.8升级的unkown问题
- 解决评论时文章标题含有'的问题
- 解决tags编辑无限制的问题
我会看看大家的回复,把所有BUG都修改好的,最近破解了几个商业论坛的代码。慢慢学习中……
[安全天使|...|2005-10-25]
[没有分类]Photo Album: 北京之美
内容:
More Photos...
北京之美
天安门人好多 | 直冲云天 | 人民大会堂啊:) | 老四和燕子姐 | |||
比起纪念碑来,我好小 | 崇拜毛主席的Foreigner | 长城的美 | 傲气一把 | |||
搓澡(枣) | 我是长城上望风的人 |

[编辑的风月事|...|2005-10-9]
[没有分类]Photo Album: 北戴河之旅
内容:

北戴河之旅
背朝大海 春暖花开 | 和老张 | 和美女在一起 | 美女与野兽 | |||
这个球够大吧 | 我是大力士 | 放天&ME | 后海边 | |||
酒吧内 | 美女雪糕 |

[编辑的风月事|...|2005-9-22]
[没有分类]Photo Album: 我的北京
内容:

我的北京
妈妈和小侄 | 看霍明远那小样,像领导一样:) | 呼呼,被我压住了吧 | 天坛最南端 | |||
回音壁那儿确实回音 | 怀念的北京之旅 |

[编辑的风月事|...|2005-8-16]
[没有分类]java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
内容:
一般来说是你的事务里的这个方法设置了readOnly 您还可能感兴趣的文章:2009年11月4日 -- java.lang.IllegalStateException: getAttribute: Session already invalidated 解决方案 (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode (0)
一般来说是你的事务里的这个方法设置了readOnly 您还可能感兴趣的文章:2009年11月4日 -- java.lang.IllegalStateException: getAttribute: Session already invalidated 解决方案 (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode (0)
[关注 J2EE|...|1899-12-30]
[没有分类]split 不能直接对小数点做分割
内容:
超挫的事情,弄了我5分钟只好请教前辈去了。原来不能直接写split(".")而是应该写split("\\."); 您还可能感兴趣的文章:2009年11月3日 -- 常用servlet过滤器 (0)2009年11月2日 -- 懒就要懒的经典 (0)2009年10月30日 -- 用java反射写的通用封装实体数据类 (0)2009年10月29日 -- 把一个bean里所有属性的值copy到另外一个bean里的好方法 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 泛型的获取和使用 (0)
超挫的事情,弄了我5分钟只好请教前辈去了。原来不能直接写split(".")而是应该写split("\\."); 您还可能感兴趣的文章:2009年11月3日 -- 常用servlet过滤器 (0)2009年11月2日 -- 懒就要懒的经典 (0)2009年10月30日 -- 用java反射写的通用封装实体数据类 (0)2009年10月29日 -- 把一个bean里所有属性的值copy到另外一个bean里的好方法 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 泛型的获取和使用 (0)
[关注 J2EE|...|1899-12-30]
[没有分类]Spring3 之SpEL
内容:
Spring 3.0 Reference:http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/index.html Part III 核心技术 6.Spring 表达式语言(SpEL) 6.1 简介 6.2 特性概览 6.3 使用Spring Expression接口进行表达式求值 6.4 bean定义的表达式支持 6.5 语言参考 6.6 示例类 6.1 简介 Spring表达式语言(简称SpEL)是一个支持运行时查询和操作对象图的强大的表达式语言。其语法类似于统一EL,但提供了额外特性,显式方法调用和基本字符串模板函数。 同很多可用的Java 表达式语言相比,例如OGNL,MVEL和JBoss EL,SpEL的诞生是为了给Spring社区提供一个可以给Spring目录中所有产品提供单一良好支持的表达式语言。其语言特性由Spring目录中的项目需求驱动,包括基于eclipse的SpringSource套件中的代码补全工具需求。那就是说,SpEL是一个基于技术中立的API允许需要时与其他表达式语言集成。 SpEL作为Spring目录中表达式求值的基础,它并不是直接依赖于Spring而是可以被独立使用。为了能够自包含,本章中的许多示例把SpEL作为一个独立的表达式语言来使用。这就需要创建一些如解析器的引导基础组件类。大多数Spring用户只需要为求值编写表达式字符串而不需要关心这些基础组件。一个典型的使用例子是集成SpEL和创建基于XML或注解的bean定义,见6.4 bean定义的表达式支持一节。 本章涵盖了表达式语言的特性,API和语法。在很多地方,一个Inventor类和Invertor的Society类作为表达式求值的目标对象。这些类声明和操作它们使用的数据列在本章的末尾。 6.2 特性概览 表达式语言支持下列功能: 字符表达式 布尔和关系操作符 正则表达式 类表达式 访问properties,arrays,lists,maps 方法调用 关系操作符 赋值 调用构造器 三元操作符 变量 用户自定义函数 集合投影 集合选择 模板表达式 6.3 使用Spring Expression接口进行表达式求值 这一节介绍SpEL接口和其表达式语言的简单实用。完整的语言参考参见语言参考一节。 下面的代码使用SpEL API求字符表达式‘Hello World’的值。 ExpressionParserparser= new SpelExpressionParser(); Expressionexp=parser.parseExpression("'HelloWorld'"); [...]
Spring 3.0 Reference:http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/index.html Part III 核心技术 6.Spring 表达式语言(SpEL) 6.1 简介 6.2 特性概览 6.3 使用Spring Expression接口进行表达式求值 6.4 bean定义的表达式支持 6.5 语言参考 6.6 示例类 6.1 简介 Spring表达式语言(简称SpEL)是一个支持运行时查询和操作对象图的强大的表达式语言。其语法类似于统一EL,但提供了额外特性,显式方法调用和基本字符串模板函数。 同很多可用的Java 表达式语言相比,例如OGNL,MVEL和JBoss EL,SpEL的诞生是为了给Spring社区提供一个可以给Spring目录中所有产品提供单一良好支持的表达式语言。其语言特性由Spring目录中的项目需求驱动,包括基于eclipse的SpringSource套件中的代码补全工具需求。那就是说,SpEL是一个基于技术中立的API允许需要时与其他表达式语言集成。 SpEL作为Spring目录中表达式求值的基础,它并不是直接依赖于Spring而是可以被独立使用。为了能够自包含,本章中的许多示例把SpEL作为一个独立的表达式语言来使用。这就需要创建一些如解析器的引导基础组件类。大多数Spring用户只需要为求值编写表达式字符串而不需要关心这些基础组件。一个典型的使用例子是集成SpEL和创建基于XML或注解的bean定义,见6.4 bean定义的表达式支持一节。 本章涵盖了表达式语言的特性,API和语法。在很多地方,一个Inventor类和Invertor的Society类作为表达式求值的目标对象。这些类声明和操作它们使用的数据列在本章的末尾。 6.2 特性概览 表达式语言支持下列功能: 字符表达式 布尔和关系操作符 正则表达式 类表达式 访问properties,arrays,lists,maps 方法调用 关系操作符 赋值 调用构造器 三元操作符 变量 用户自定义函数 集合投影 集合选择 模板表达式 6.3 使用Spring Expression接口进行表达式求值 这一节介绍SpEL接口和其表达式语言的简单实用。完整的语言参考参见语言参考一节。 下面的代码使用SpEL API求字符表达式‘Hello World’的值。 ExpressionParserparser= new SpelExpressionParser(); Expressionexp=parser.parseExpression("'HelloWorld'"); [...]
[关注 J2EE|...|1899-12-30]
[没有分类]spring事务详细探索
内容:
在所有使用 spring 的应用中, 声明式事务管理可能是使用率最高的功能了, 但是, 从我观察到的情况看, 绝大多数人并不能深刻理解事务声明中不同事务传播属性配置的的含义, 让我们来看一下 TransactionDefinition 接口中的定义 Java代码/** * Support a current transaction, create a new one if none exists. * Analogous to EJB transaction attribute of the same name. * <p>This is typically the default setting of a transaction definition. */ int PROPAGATION_REQUIRED = 0; /** * Support a current transaction, execute non-transactionally if none exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: For transaction managers with transaction synchronization, * PROPAGATION_SUPPORTS is slightly different from no transaction at all, * as it defines a transaction scopp that synchronization will apply for. * As a consequence, the same resources (JDBC Connection, Hibernate Session, etc) * will be shared for the entire specified scope. Note that this depends on * the actual synchronization configuration of the transaction manager. * @see org.springframework.transaction.support.AbstractPlatformTransactionManager#setTransactionSynchronization */ int PROPAGATION_SUPPORTS = 1; /** * Support a current transaction, throw an exception if none exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_MANDATORY = 2; /** * Create a new transaction, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_REQUIRES_NEW = 3; /** * Execute non-transactionally, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_NOT_SUPPORTED = 4; /** * Execute non-transactionally, throw an exception if a transaction exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_NEVER = 5; /** [...]
在所有使用 spring 的应用中, 声明式事务管理可能是使用率最高的功能了, 但是, 从我观察到的情况看, 绝大多数人并不能深刻理解事务声明中不同事务传播属性配置的的含义, 让我们来看一下 TransactionDefinition 接口中的定义 Java代码/** * Support a current transaction, create a new one if none exists. * Analogous to EJB transaction attribute of the same name. * <p>This is typically the default setting of a transaction definition. */ int PROPAGATION_REQUIRED = 0; /** * Support a current transaction, execute non-transactionally if none exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: For transaction managers with transaction synchronization, * PROPAGATION_SUPPORTS is slightly different from no transaction at all, * as it defines a transaction scopp that synchronization will apply for. * As a consequence, the same resources (JDBC Connection, Hibernate Session, etc) * will be shared for the entire specified scope. Note that this depends on * the actual synchronization configuration of the transaction manager. * @see org.springframework.transaction.support.AbstractPlatformTransactionManager#setTransactionSynchronization */ int PROPAGATION_SUPPORTS = 1; /** * Support a current transaction, throw an exception if none exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_MANDATORY = 2; /** * Create a new transaction, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_REQUIRES_NEW = 3; /** * Execute non-transactionally, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_NOT_SUPPORTED = 4; /** * Execute non-transactionally, throw an exception if a transaction exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_NEVER = 5; /** [...]
[关注 J2EE|...|1899-12-30]
内容:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>cdn</display-name> <context-param> <param-name>initDomainInfo</param-name> <param-value>domain:woniu.com,host:@,type:SOA,data:ns1.xxxx.com,ttl:3600,view:DF,state:1,</param-value> </context-param> </web-app> —–下面写一个listener用于加载并读取全局变量写入上下文 package com.snail.dns.listeners; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import com.snail.dns.common.Constants; import com.snail.dns.util.ParameterUtil; /** * @blog http://www.gbsou.com * @author Jeson * */ public class ContextPathListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { ServletContext sc = sce.getServletContext(); sc.setAttribute(Constants.WEBAPP_CONTEXT_PATH_KEY, getContextPath(sc)); //读取web.xml中的context-param String domainInitParameters = sce.getServletContext().getInitParameter("initDomainInfo"); if(!ParameterUtil.isNullOrBlank(domainInitParameters)){ Map<String, Object> domainMap = [...]
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>cdn</display-name> <context-param> <param-name>initDomainInfo</param-name> <param-value>domain:woniu.com,host:@,type:SOA,data:ns1.xxxx.com,ttl:3600,view:DF,state:1,</param-value> </context-param> </web-app> —–下面写一个listener用于加载并读取全局变量写入上下文 package com.snail.dns.listeners; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import com.snail.dns.common.Constants; import com.snail.dns.util.ParameterUtil; /** * @blog http://www.gbsou.com * @author Jeson * */ public class ContextPathListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { ServletContext sc = sce.getServletContext(); sc.setAttribute(Constants.WEBAPP_CONTEXT_PATH_KEY, getContextPath(sc)); //读取web.xml中的context-param String domainInitParameters = sce.getServletContext().getInitParameter("initDomainInfo"); if(!ParameterUtil.isNullOrBlank(domainInitParameters)){ Map<String, Object> domainMap = [...]
[关注 J2EE|...|1899-12-30]
[没有分类]java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
内容:
一般来说是你的事务里的这个方法设置了readOnly 您还可能感兴趣的文章:2009年11月4日 -- java.lang.IllegalStateException: getAttribute: Session already invalidated 解决方案 (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode (0)
一般来说是你的事务里的这个方法设置了readOnly 您还可能感兴趣的文章:2009年11月4日 -- java.lang.IllegalStateException: getAttribute: Session already invalidated 解决方案 (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode (0)
[关注 J2EE|...|1899-12-30]
[没有分类]记一句好的linux语句
内容:
kill -9 `ps aux |grep tomcat1|grep -v grep|cut -c 9-15`;rm -rdf ./logs/* ./temp/* ./work/* ./webapps/* ;./bin/startup.sh;tail -f ./logs/catalina.out 您还可能感兴趣的文章:2009年08月17日 -- 系统使用的快捷键 (0)2009年08月16日 -- linux命令 (0)2009年08月12日 -- vista下tomcat抛出的java.io.IOException: Cannot rename original file to tomcat-users.xml.old异常的解决 (0)
kill -9 `ps aux |grep tomcat1|grep -v grep|cut -c 9-15`;rm -rdf ./logs/* ./temp/* ./work/* ./webapps/* ;./bin/startup.sh;tail -f ./logs/catalina.out 您还可能感兴趣的文章:2009年08月17日 -- 系统使用的快捷键 (0)2009年08月16日 -- linux命令 (0)2009年08月12日 -- vista下tomcat抛出的java.io.IOException: Cannot rename original file to tomcat-users.xml.old异常的解决 (0)
[关注 J2EE|...|1899-12-30]
内容:
request.getSession()不管有没有参数,如果会话已经存在了,那么就会返回存在的会话; 设置参数的目的只是当会话不存在时,返回null还是新的session的区别, 参数为true时,返回的是null; 没有参数或是false则返回新的session 您还可能感兴趣的文章:2009年11月3日 -- jsp 隐藏真实URL 地址(转) (0)2009年11月3日 -- jstl format标签常用格式化方法 (0)2009年11月3日 -- 获取前一个请求页面地址 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 注销功能的实现 (0)2009年10月24日 -- JSP程序中Listener和Timer的运用 (0)
request.getSession()不管有没有参数,如果会话已经存在了,那么就会返回存在的会话; 设置参数的目的只是当会话不存在时,返回null还是新的session的区别, 参数为true时,返回的是null; 没有参数或是false则返回新的session 您还可能感兴趣的文章:2009年11月3日 -- jsp 隐藏真实URL 地址(转) (0)2009年11月3日 -- jstl format标签常用格式化方法 (0)2009年11月3日 -- 获取前一个请求页面地址 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 注销功能的实现 (0)2009年10月24日 -- JSP程序中Listener和Timer的运用 (0)
[关注 J2EE|...|1899-12-30]
内容:
应该是注销之后,再跳转也是需要session的,所以呢,清空session之后应该再给一个新的session。 否则,需要SESSION 的时候,却没有,当然就要抛异常啦。 您还可能感兴趣的文章:2009年11月5日 -- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode [...]
应该是注销之后,再跳转也是需要session的,所以呢,清空session之后应该再给一个新的session。 否则,需要SESSION 的时候,却没有,当然就要抛异常啦。 您还可能感兴趣的文章:2009年11月5日 -- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode [...]
[关注 J2EE|...|1899-12-30]
内容:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>cdn</display-name> <context-param> <param-name>initDomainInfo</param-name> <param-value>domain:woniu.com,host:@,type:SOA,data:ns1.xxxx.com,ttl:3600,view:DF,state:1,</param-value> </context-param> </web-app> —–下面写一个listener用于加载并读取全局变量写入上下文 package com.snail.dns.listeners; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import com.snail.dns.common.Constants; import com.snail.dns.util.ParameterUtil; /** * @blog http://www.gbsou.com * @author Jeson * */ public class ContextPathListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { ServletContext sc = sce.getServletContext(); sc.setAttribute(Constants.WEBAPP_CONTEXT_PATH_KEY, getContextPath(sc)); //读取web.xml中的context-param String domainInitParameters = sce.getServletContext().getInitParameter("initDomainInfo"); if(!ParameterUtil.isNullOrBlank(domainInitParameters)){ Map<String, Object> domainMap = [...]
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>cdn</display-name> <context-param> <param-name>initDomainInfo</param-name> <param-value>domain:woniu.com,host:@,type:SOA,data:ns1.xxxx.com,ttl:3600,view:DF,state:1,</param-value> </context-param> </web-app> —–下面写一个listener用于加载并读取全局变量写入上下文 package com.snail.dns.listeners; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import com.snail.dns.common.Constants; import com.snail.dns.util.ParameterUtil; /** * @blog http://www.gbsou.com * @author Jeson * */ public class ContextPathListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { ServletContext sc = sce.getServletContext(); sc.setAttribute(Constants.WEBAPP_CONTEXT_PATH_KEY, getContextPath(sc)); //读取web.xml中的context-param String domainInitParameters = sce.getServletContext().getInitParameter("initDomainInfo"); if(!ParameterUtil.isNullOrBlank(domainInitParameters)){ Map<String, Object> domainMap = [...]
[关注 J2EE|...|1899-12-30]
[没有分类]弹出是否删除信息的javascript脚本代码
内容:
var msg = "您真的确定要删除吗?\\n\\n请确认!"; return confirm(msg) == true ; 您还可能感兴趣的文章:2009年11月6日 -- 记一个比较好的域名正则表达式 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
var msg = "您真的确定要删除吗?\\n\\n请确认!"; return confirm(msg) == true ; 您还可能感兴趣的文章:2009年11月6日 -- 记一个比较好的域名正则表达式 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
[关注 J2EE|...|1899-12-30]
内容:
应该是注销之后,再跳转也是需要session的,所以呢,清空session之后应该再给一个新的session。 否则,需要SESSION 的时候,却没有,当然就要抛异常啦。 您还可能感兴趣的文章:2009年11月5日 -- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode [...]
应该是注销之后,再跳转也是需要session的,所以呢,清空session之后应该再给一个新的session。 否则,需要SESSION 的时候,却没有,当然就要抛异常啦。 您还可能感兴趣的文章:2009年11月5日 -- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed (0)2009年10月30日 -- struts2 验证一次失败后 下面操作不能执行的解决方案 (0)2009年10月29日 -- org.hibernate.PersistentObjectException: detached entity passed to persist: (0)2009年10月29日 -- java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; (0)2009年10月28日 -- struts2 当spring遇到json插件时的异常 及解决 (0)2009年10月27日 -- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode [...]
[关注 J2EE|...|1899-12-30]
[没有分类]记一个比较好的域名正则表达式
内容:
几个用下来 就这个最好了 ^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$ 您还可能感兴趣的文章:2009年11月6日 -- 弹出是否删除信息的javascript脚本代码 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
几个用下来 就这个最好了 ^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$ 您还可能感兴趣的文章:2009年11月6日 -- 弹出是否删除信息的javascript脚本代码 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
[关注 J2EE|...|1899-12-30]
[没有分类]Spring3 之SpEL
内容:
Spring 3.0 Reference:http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/index.html Part III 核心技术 6.Spring 表达式语言(SpEL) 6.1 简介 6.2 特性概览 6.3 使用Spring Expression接口进行表达式求值 6.4 bean定义的表达式支持 6.5 语言参考 6.6 示例类 6.1 简介 Spring表达式语言(简称SpEL)是一个支持运行时查询和操作对象图的强大的表达式语言。其语法类似于统一EL,但提供了额外特性,显式方法调用和基本字符串模板函数。 同很多可用的Java 表达式语言相比,例如OGNL,MVEL和JBoss EL,SpEL的诞生是为了给Spring社区提供一个可以给Spring目录中所有产品提供单一良好支持的表达式语言。其语言特性由Spring目录中的项目需求驱动,包括基于eclipse的SpringSource套件中的代码补全工具需求。那就是说,SpEL是一个基于技术中立的API允许需要时与其他表达式语言集成。 SpEL作为Spring目录中表达式求值的基础,它并不是直接依赖于Spring而是可以被独立使用。为了能够自包含,本章中的许多示例把SpEL作为一个独立的表达式语言来使用。这就需要创建一些如解析器的引导基础组件类。大多数Spring用户只需要为求值编写表达式字符串而不需要关心这些基础组件。一个典型的使用例子是集成SpEL和创建基于XML或注解的bean定义,见6.4 bean定义的表达式支持一节。 本章涵盖了表达式语言的特性,API和语法。在很多地方,一个Inventor类和Invertor的Society类作为表达式求值的目标对象。这些类声明和操作它们使用的数据列在本章的末尾。 6.2 特性概览 表达式语言支持下列功能: 字符表达式 布尔和关系操作符 正则表达式 类表达式 访问properties,arrays,lists,maps 方法调用 关系操作符 赋值 调用构造器 三元操作符 变量 用户自定义函数 集合投影 集合选择 模板表达式 6.3 使用Spring Expression接口进行表达式求值 这一节介绍SpEL接口和其表达式语言的简单实用。完整的语言参考参见语言参考一节。 下面的代码使用SpEL API求字符表达式‘Hello World’的值。 ExpressionParserparser= new SpelExpressionParser(); Expressionexp=parser.parseExpression("'HelloWorld'"); [...]
Spring 3.0 Reference:http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/index.html Part III 核心技术 6.Spring 表达式语言(SpEL) 6.1 简介 6.2 特性概览 6.3 使用Spring Expression接口进行表达式求值 6.4 bean定义的表达式支持 6.5 语言参考 6.6 示例类 6.1 简介 Spring表达式语言(简称SpEL)是一个支持运行时查询和操作对象图的强大的表达式语言。其语法类似于统一EL,但提供了额外特性,显式方法调用和基本字符串模板函数。 同很多可用的Java 表达式语言相比,例如OGNL,MVEL和JBoss EL,SpEL的诞生是为了给Spring社区提供一个可以给Spring目录中所有产品提供单一良好支持的表达式语言。其语言特性由Spring目录中的项目需求驱动,包括基于eclipse的SpringSource套件中的代码补全工具需求。那就是说,SpEL是一个基于技术中立的API允许需要时与其他表达式语言集成。 SpEL作为Spring目录中表达式求值的基础,它并不是直接依赖于Spring而是可以被独立使用。为了能够自包含,本章中的许多示例把SpEL作为一个独立的表达式语言来使用。这就需要创建一些如解析器的引导基础组件类。大多数Spring用户只需要为求值编写表达式字符串而不需要关心这些基础组件。一个典型的使用例子是集成SpEL和创建基于XML或注解的bean定义,见6.4 bean定义的表达式支持一节。 本章涵盖了表达式语言的特性,API和语法。在很多地方,一个Inventor类和Invertor的Society类作为表达式求值的目标对象。这些类声明和操作它们使用的数据列在本章的末尾。 6.2 特性概览 表达式语言支持下列功能: 字符表达式 布尔和关系操作符 正则表达式 类表达式 访问properties,arrays,lists,maps 方法调用 关系操作符 赋值 调用构造器 三元操作符 变量 用户自定义函数 集合投影 集合选择 模板表达式 6.3 使用Spring Expression接口进行表达式求值 这一节介绍SpEL接口和其表达式语言的简单实用。完整的语言参考参见语言参考一节。 下面的代码使用SpEL API求字符表达式‘Hello World’的值。 ExpressionParserparser= new SpelExpressionParser(); Expressionexp=parser.parseExpression("'HelloWorld'"); [...]
[关注 J2EE|...|1899-12-30]
[没有分类]spring事务详细探索
内容:
在所有使用 spring 的应用中, 声明式事务管理可能是使用率最高的功能了, 但是, 从我观察到的情况看, 绝大多数人并不能深刻理解事务声明中不同事务传播属性配置的的含义, 让我们来看一下 TransactionDefinition 接口中的定义 Java代码/** * Support a current transaction, create a new one if none exists. * Analogous to EJB transaction attribute of the same name. * <p>This is typically the default setting of a transaction definition. */ int PROPAGATION_REQUIRED = 0; /** * Support a current transaction, execute non-transactionally if none exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: For transaction managers with transaction synchronization, * PROPAGATION_SUPPORTS is slightly different from no transaction at all, * as it defines a transaction scopp that synchronization will apply for. * As a consequence, the same resources (JDBC Connection, Hibernate Session, etc) * will be shared for the entire specified scope. Note that this depends on * the actual synchronization configuration of the transaction manager. * @see org.springframework.transaction.support.AbstractPlatformTransactionManager#setTransactionSynchronization */ int PROPAGATION_SUPPORTS = 1; /** * Support a current transaction, throw an exception if none exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_MANDATORY = 2; /** * Create a new transaction, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_REQUIRES_NEW = 3; /** * Execute non-transactionally, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_NOT_SUPPORTED = 4; /** * Execute non-transactionally, throw an exception if a transaction exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_NEVER = 5; /** [...]
在所有使用 spring 的应用中, 声明式事务管理可能是使用率最高的功能了, 但是, 从我观察到的情况看, 绝大多数人并不能深刻理解事务声明中不同事务传播属性配置的的含义, 让我们来看一下 TransactionDefinition 接口中的定义 Java代码/** * Support a current transaction, create a new one if none exists. * Analogous to EJB transaction attribute of the same name. * <p>This is typically the default setting of a transaction definition. */ int PROPAGATION_REQUIRED = 0; /** * Support a current transaction, execute non-transactionally if none exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: For transaction managers with transaction synchronization, * PROPAGATION_SUPPORTS is slightly different from no transaction at all, * as it defines a transaction scopp that synchronization will apply for. * As a consequence, the same resources (JDBC Connection, Hibernate Session, etc) * will be shared for the entire specified scope. Note that this depends on * the actual synchronization configuration of the transaction manager. * @see org.springframework.transaction.support.AbstractPlatformTransactionManager#setTransactionSynchronization */ int PROPAGATION_SUPPORTS = 1; /** * Support a current transaction, throw an exception if none exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_MANDATORY = 2; /** * Create a new transaction, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_REQUIRES_NEW = 3; /** * Execute non-transactionally, suspend the current transaction if one exists. * Analogous to EJB transaction attribute of the same name. * <p>Note: Actual transaction suspension will not work on out-of-the-box * on all transaction managers. This in particular applies to JtaTransactionManager, * which requires the <code>javax.transaction.TransactionManager</code> to be * made available it to it (which is server-specific in standard J2EE). * @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager */ int PROPAGATION_NOT_SUPPORTED = 4; /** * Execute non-transactionally, throw an exception if a transaction exists. * Analogous to EJB transaction attribute of the same name. */ int PROPAGATION_NEVER = 5; /** [...]
[关注 J2EE|...|1899-12-30]
[没有分类]弹出是否删除信息的javascript脚本代码
内容:
var msg = "您真的确定要删除吗?\\n\\n请确认!"; return confirm(msg) == true ; 您还可能感兴趣的文章:2009年11月6日 -- 记一个比较好的域名正则表达式 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
var msg = "您真的确定要删除吗?\\n\\n请确认!"; return confirm(msg) == true ; 您还可能感兴趣的文章:2009年11月6日 -- 记一个比较好的域名正则表达式 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
[关注 J2EE|...|1899-12-30]
[没有分类]记一句好的linux语句
内容:
kill -9 `ps aux |grep tomcat1|grep -v grep|cut -c 9-15`;rm -rdf ./logs/* ./temp/* ./work/* ./webapps/* ;./bin/startup.sh;tail -f ./logs/catalina.out 您还可能感兴趣的文章:2009年08月17日 -- 系统使用的快捷键 (0)2009年08月16日 -- linux命令 (0)2009年08月12日 -- vista下tomcat抛出的java.io.IOException: Cannot rename original file to tomcat-users.xml.old异常的解决 (0)
kill -9 `ps aux |grep tomcat1|grep -v grep|cut -c 9-15`;rm -rdf ./logs/* ./temp/* ./work/* ./webapps/* ;./bin/startup.sh;tail -f ./logs/catalina.out 您还可能感兴趣的文章:2009年08月17日 -- 系统使用的快捷键 (0)2009年08月16日 -- linux命令 (0)2009年08月12日 -- vista下tomcat抛出的java.io.IOException: Cannot rename original file to tomcat-users.xml.old异常的解决 (0)
[关注 J2EE|...|1899-12-30]
内容:
request.getSession()不管有没有参数,如果会话已经存在了,那么就会返回存在的会话; 设置参数的目的只是当会话不存在时,返回null还是新的session的区别, 参数为true时,返回的是null; 没有参数或是false则返回新的session 您还可能感兴趣的文章:2009年11月3日 -- jsp 隐藏真实URL 地址(转) (0)2009年11月3日 -- jstl format标签常用格式化方法 (0)2009年11月3日 -- 获取前一个请求页面地址 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 注销功能的实现 (0)2009年10月24日 -- JSP程序中Listener和Timer的运用 (0)
request.getSession()不管有没有参数,如果会话已经存在了,那么就会返回存在的会话; 设置参数的目的只是当会话不存在时,返回null还是新的session的区别, 参数为true时,返回的是null; 没有参数或是false则返回新的session 您还可能感兴趣的文章:2009年11月3日 -- jsp 隐藏真实URL 地址(转) (0)2009年11月3日 -- jstl format标签常用格式化方法 (0)2009年11月3日 -- 获取前一个请求页面地址 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 注销功能的实现 (0)2009年10月24日 -- JSP程序中Listener和Timer的运用 (0)
[关注 J2EE|...|1899-12-30]
[没有分类]记一个比较好的域名正则表达式
内容:
几个用下来 就这个最好了 ^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$ 您还可能感兴趣的文章:2009年11月6日 -- 弹出是否删除信息的javascript脚本代码 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
几个用下来 就这个最好了 ^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$ 您还可能感兴趣的文章:2009年11月6日 -- 弹出是否删除信息的javascript脚本代码 (0)2009年11月3日 -- 常用js表单验证大全 (0)2009年11月3日 -- JS获取父页面 (0)2009年11月3日 -- 常用js正则表达式 (0)2009年10月30日 -- javascript脚本获取前台页面地址栏中的url里的参数 (0)2009年10月29日 -- jquery 表单序列化函数 (找个地记一下) (0)
[关注 J2EE|...|1899-12-30]
[没有分类]split 不能直接对小数点做分割
内容:
超挫的事情,弄了我5分钟只好请教前辈去了。原来不能直接写split(".")而是应该写split("\\."); 您还可能感兴趣的文章:2009年11月3日 -- 常用servlet过滤器 (0)2009年11月2日 -- 懒就要懒的经典 (0)2009年10月30日 -- 用java反射写的通用封装实体数据类 (0)2009年10月29日 -- 把一个bean里所有属性的值copy到另外一个bean里的好方法 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 泛型的获取和使用 (0)
超挫的事情,弄了我5分钟只好请教前辈去了。原来不能直接写split(".")而是应该写split("\\."); 您还可能感兴趣的文章:2009年11月3日 -- 常用servlet过滤器 (0)2009年11月2日 -- 懒就要懒的经典 (0)2009年10月30日 -- 用java反射写的通用封装实体数据类 (0)2009年10月29日 -- 把一个bean里所有属性的值copy到另外一个bean里的好方法 (0)2009年10月28日 -- struts1,struts2通用的身份验证filter (0)2009年10月26日 -- 泛型的获取和使用 (0)
[关注 J2EE|...|1899-12-30]






