`
ajdan4q
  • 浏览: 20637 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
2.6 构建java程序   2.6.1      名字的可见性(包)      如何区分两个名字,并防止两个名字互相冲突呢?java中通过使用反转自已的域名,来做为包的名字,并且整个包都是以   小写字母为标准。java的这种特殊机制意味自所有的文件自动存在于自已的命名空间中。一个文件里的每一个类都获得独一   无二的标识符(一个文件里的类名必须唯一)。   2.6.2      使用其它组件(使用其它类)       一旦要在自已类中使用已定义的类,必须明确的告诉编译器如何找到这个类。         如果要调在的类在同一个源文件中,只需简单使用这类即可——即使它 ...
1、  js放置在<body></body>中 当页面载入时,会执行位于 body 部分的 JavaScript。 即会自动执行。 2、  js放置在<head></head> 中 当被调用时(已经载入),位于 head 部分的 JavaScript 才会被执行。 不会被自动执行。可通过脚本调用、事件触发,而执行
JQuery Float Dialog是一个浮动对话框,可通过参数控制对话框弹出速度、全屏背景、弹出回调事件、弹出的方向等。 http://www.expbuilder.com/floatdialog/#demo1viewsource
An A-Z Index of the Bash command line for Linux.   alias    Create an alias   apropos  Search Help manual pages (man -k)   apt-get  Search for and install software packages (Debian)   aspell   Spell Checker   awk      Find and Replace text, database sort/validate/index b   bash     GNU Bourne-Again S ...
出处:[url]http://www.iteye.com/topic/339643[/url] Author : [b]L.G.Alexander[/b] [code="java"] class Parent{ static String name = "hello"; static { System.out.println("parent static block"); } { System.out.println(&q ...
Hibernate SchemaExport 是一个根据Hibernate映射定义转化为数据库定义的工具。 Hibernate SchemaExport实际是Hibernate包的一部分, 在开发Hibernate程序时,会在hibernate.cfg.xml中设置一个属性hibernate.hbm2ddl.auto, 这个属性有三个值:creat,update,create-drop,一般设置为update 设置这个属性后,Hibernate加载映射文件时,会自动检查数据库中表的定义。如果设置为update, Hibernate会检查映射文件中的表,是否被修改过,如果不存在,Hibern ...
如果关联的集合的lazy属性设为true,即采用延迟加载,则在VIEW层加载数据时,容易出现session已关闭等类似的问题。 最不好的方法,就是将所有集合的lazy设为false。 一般可采用Open Session in View模式的方法,即如名字所表达的意思那样,Hibernate Session在Model层打开后,保持打开状态,直到View层加载完数据后,才关闭Session. Spring提供两种方法,实现openSessionInView,(当然也可以自已实现) 一种是使用OpenSessionInViewInterceptor,(在Spring的Bean配置文件中配 ...
No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here spring+hibernate 插入数据时,发生以上错误。 解决方法:加入事务处理(声明式事务处理),    配置一个HibernateTransactionManager    配置一个TransactionProxyFactoryBean 在BEAN配置文件配置如下: <bean id="baseTransactionProxy" c ...
Inversion of Control Containers and the Dependency Injection pattern Martin Fowler In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they per ...
当客户请求到来时,前端控制器DispatcherServlet会根据Handler Mapping对象来决定,如何将请求分配至对应的Controller,对于WEB应该程序来说,通常就是以URL路径对应至Controller DispatcherServlet默认的Handler Mapping对象是          org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping. BeanNameUrlHandlerMapping是简单的Handler Mapping,仅适应用小型的应用程序,因为它使得URL与 C ...
在web.xml 加入以下配置: <!-- 帮助找到spring配置文件 --> <!-- 第一种方法:配置ContextLoaderListener --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/classes/applicationContext.xml </param-value> </context-param> ...
在web.xml 加入sitemesh 过滤器,并配置过滤器映射,例子如下: web.xml <!-- sitemesh 过滤器 配置 --> <filter> <filter-name>sitemesh</filter-name> <filter-class> com.opensymphony.sitemesh.webapp.SiteMeshFilter </filter-class> </filter> <!-- sitemesh mapping ...
情况一 描述:对静态页面装饰的话,不论怎么设置编码都是乱码。 解决:动态页面(中文乱码)可以在装饰页面 头部 设置   <%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> 静态页面(乱码) 把html 改为  jsp  ,并在其页面头部加上:   <%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %&g ...
Platform Defaults (平台默认) siteMesh默认的字符集是iso-8859-1,它假定底层平台的字符集也是iso-8859-1。 这可以引起相当多的问题,当底层平台的字符集不是iso-8859-1时,就会被siteMesh默认的字符集所覆盖。 Using Other Encodings  (使用其它编码) 下面的例子演示了如何在sitemesh 中 使用utf-8编码,当然也可以使用其它编码,如gbk/gb2312 1、如果可能可以将web app的默认编码配置成utf-8。Tomcat/Weblogic,都可以配置默认的的编码,具体参考各应用服务器文档 ...
解决方法:在decorators.xml,设置让sitemesh不过滤FCKeditor. decorators.xml <decorators defaultdir="/decorators"> <excludes> <pattern>/fckeditor/*</pattern> </excludes> </decorators> 之后,记得要清除浏览器缓存。。不然,不会立即看到效果。
Global site tag (gtag.js) - Google Analytics