首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

lift中的途径映射

2012-10-24 
lift中的路径映射以下英文引用自:http://simply.liftweb.net/index-3.3.html#toc-Subsection-3.3.1引用Onc

lift中的路径映射
以下英文引用自:http://simply.liftweb.net/index-3.3.html#toc-Subsection-3.3.1

引用Once the access control is granted by SiteMap, Lift loads the view related to the URL. There are many mechanisms that Lift uses to resolve a path to a view, but the simplest is a one to one mapping between the URL path and the files in /src/main/webapp. If the URL is /index, then Lift will look for the localized (see 8.1 on page 1↓) version of /src/main/webapp/index.html. Once Lift loads the template, Lift processes it to transform it into the dynamic content you want to return in response to the URL input.


路径映射由SiteMap控制,如果有的话(Boot.scala文件中).
最简单的映射机制是一对一的映射,将URL路径映射到/src/main/webapp目录下,如果URL是/index,那lift会查找/src/main/webapp/index.html文件,前提是SiteMap未设置.

热点排行