第一步:在hivemodule.xml中配置,代码如下:
1 <contribution configuration-id="tapestry.url.ServiceEncoders">
2 <page-service-encoder id="page" extension="html" service="page" />
3 <direct-service-encoder id="direct" stateless-extension="direct"
4 stateful-extension="sdirect" />
5 <extension-encoder id="extension" extension="svc" after="*" />
6 <asset-encoder id="asset" path="/assets" />
7 </contribution>
第二步:web.xml中配置:
1 <servlet-mapping>
2 <servlet-name>XCCZ</servlet-name>
3 <url-pattern>*.html</url-pattern>
4 </servlet-mapping>
5
6 <servlet-mapping>
7 <servlet-name>XCCZ</servlet-name>
8 <url-pattern>*.external</url-pattern>
9 </servlet-mapping>
10
11 <servlet-mapping>
12 <servlet-name>XCCZ</servlet-name>
13 <url-pattern>*.direct</url-pattern>
14 </servlet-mapping>
15
16 <servlet-mapping>
17 <servlet-name>XCCZ</servlet-name>
18 <url-pattern>*.sdirect</url-pattern>
19 </servlet-mapping>
20 <servlet-mapping>
21 <servlet-name>XCCZ</servlet-name>
22 <url-pattern>*.svc</url-pattern>
23 </servlet-mapping>
24 <servlet-mapping>
25 <servlet-name>XCCZ</servlet-name>
26 <url-pattern>/assets/*</url-pattern>
27 </servlet-mapping>
代码格式都是固定的,照抄就行。
posted on 2008-04-23 09:14
零全零美 阅读(171)
评论(0) 编辑 收藏