01 2012 档案

摘要:1,HTML<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%@ taglib prefix="s" uri="/struts-tags" %><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org 阅读全文
posted @ 2012-01-30 21:34 lastren 阅读(144) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2012-01-30 21:08 lastren 阅读(12) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2012-01-30 20:58 lastren 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Tomcat中mysql的JNDI 1,MYSQL中数据库、表、用户名、密码的设置; 2.a, meta-inf文件夹下新建context.xml文件,内容同下,(2.a、2.b只要设置一种即可)。<Context><Resource name="jdbc/TestDB" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" maxIdle="100" maxWait="30" username= 阅读全文
posted @ 2012-01-29 13:39 lastren 阅读(468) 评论(0) 推荐(0) 编辑
摘要:在本action的java文档中定义了属性:private Customer customer = new Customer();并且在本action的java文档中有相应的setter和getter方法: public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; }同时,需要Customer类有无参数的构造器。则在该action中获得的customer属性可以直接在其result的jsp中使用:<s:p 阅读全文
posted @ 2012-01-29 13:36 lastren 阅读(126) 评论(0) 推荐(0) 编辑
摘要:request.getContextPath() /Aasmodrequest.getScheme() httprequest.getServerName() localhostrequest.getServerPort() 8080request.getRemoteAddr() 127.0.0.1request.getServletPath() /ttrequest.getRemoteUser() nullrequest.getRequestURI() /Aasmod/tt 阅读全文
posted @ 2012-01-29 13:29 lastren 阅读(176) 评论(0) 推荐(0) 编辑
摘要:collapsible默认为false,即必须有一栏处于打开状态,设置为true,则可关闭所有栏。fillSpacefalse: 根据内容最多的一栏的高度来设置所有栏的高度true:栏高不变,通过上下滑条来调节内容过多的栏header确定标题栏,如header: 'h3',则设置格式为h3的内容为标题栏,如不设置该属性,则在<div id="myAccordion"></div>内的任何元素都可成为标题栏,但格式会不一致。故作为标题栏的格式设置应统一,如:<h3><a href="#">Se 阅读全文
posted @ 2012-01-29 13:27 lastren 阅读(195) 评论(0) 推荐(0) 编辑
摘要:1, Struts2里的datetimepicker(注意与JAAS的冲突)把struts2-dojo-plugin-xxx.jar放到WEB-INF/lib下<%@ taglib prefix="sx" uri="/struts-dojo-tags" %><sx:head/> //parseContent="true",<s:form action="dateAction"><sx:datetimepicker name="startdate" lab 阅读全文
posted @ 2012-01-29 13:21 lastren 阅读(842) 评论(0) 推荐(0) 编辑
摘要:根据主键直接获得对象:customer = (Customer) sess.get(Customer.class, 1);或customer = (Customer) sess.load(Customer.class, 1);使用SQL的实体查询List users = (List<Customer>) sess.createSQLQuery("select * from CUSTOMER") .addEntity(Customer.class) .list();Iterator it = users.iterator();customer = (Custome 阅读全文
posted @ 2012-01-29 13:19 lastren 阅读(150) 评论(0) 推荐(0) 编辑
摘要:A hibernate.properties文件hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialecthibernate.connection.driver_class com.mysql.jdbc.Driverhibernate.connection.url jdbc:mysql://localhost:3306/hibernatehibernate.connection.username hibehibernate.connection.password 1234hibernate.connection.pool_size 5 阅读全文
posted @ 2012-01-29 13:16 lastren 阅读(263) 评论(0) 推荐(0) 编辑
摘要:A 在3.6.8版本中,可以直接用SessionFactory sf = new Configuration() .configure() // 直接用hibernate.cfg.xml来进行配置和创建 .buildSessionFactory();B 在4.0.0版本中,因Configuration().configure()方法被废除了,故用以下方式来创建Configuration config = new Configuration() .addResource("org/monday/domain/Customer.hbm.xml");ServiceRegistry 阅读全文
posted @ 2012-01-29 13:06 lastren 阅读(1798) 评论(0) 推荐(0) 编辑