friendly url配置

hivemind.xml配置:
<contribution configuration-id="tapestry.url.ServiceEncoders">
<direct-service-encoder id="direct" stateless-extension="direct" stateful-extension="sdirect"/>
<page-service-encoder id="page" extension="page" service="page"/>
<page-service-encoder id="external" extension="external" service="external"/>
<asset-encoder id="asset" path="/assets"/>
<extension-encoder id="ext" extension="svc" after="*"/>
</contribution>
web.xml配置:
<servlet>
<servlet-name>MyTapestry</servlet-name>
<servlet-class>com.gwssi.bjais.kernal.ConfigurationServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>*.page</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>*.external</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>*.direct</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>*.sdirect</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>*.svc</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MyTapestry</servlet-name>
<url-pattern>/assets/*</url-pattern>
</servlet-mapping>

你可能感兴趣的:(Web,xml)