字段
|
类型名称
|
是否为空
|
默认值
|
描述
|
Id
|
Bigint
|
否
|
|
序号
|
First_name
|
Varchar(50)
|
是
|
|
姓
|
Last_name
|
Varchar(50)
|
是
|
|
名
|
Birthday
|
timestamp
|
|
|
出生日期
|
清单
2-1 web.xml
中
sitemesh
的
filter
配置
<
filter
>
<
filter-name
>
sitemesh
filter-name
>
<
filter-class
>
com.opensymphony.module.sitemesh.filter.PageFilter
filter-class
>
filter
>
<
filter-mapping
>
<
filter-name
>
sitemesh
filter-name
>
<
url-pattern
>
/*
url-pattern
>
<
dispatcher
>
REQUEST
dispatcher
>
<
dispatcher
>
FORWARD
dispatcher
>
filter-mapping
>
|
清单
2-2 HibernateUtil.java
<
decorators
defaultdir
=
"/decorators"
>
<
decorator
name
=
"default"
page
=
"default.jsp"
>
<
pattern
>
/*
pattern
>
decorator
>
decorators
>
|
清单
2-3 sitemesh.xml
<
sitemesh
>
<
property
name
=
"decorators-file"
value
=
"/WEB-INF/decorators.xml"
/>
<
excludes
file
=
"${decorators-file}"
/>
<
page-parsers
>
<
parser
default
=
"true"
class
=
"com.opensymphony.module.sitemesh.parser.HTMLPageParser"
/>
<
parser
content-type
=
"text/html"
class
=
"com.opensymphony.module.sitemesh.parser.HTMLPageParser"
/>
<
parser
content-type
=
"text/html;charset=ISO-8859-1"
class
=
"com.opensymphony.module.sitemesh.parser.HTMLPageParser"
/>
page-parsers
>
<
decorator-mappers
>
<
mapper
class
=
"com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"
>
<
param
name
=
"config"
value
=
"${decorators-file}"
/>
mapper
>
decorator-mappers
>
sitemesh
>
|