我有一些包含不同文件的文件夹。我想使用这样的东西:http ://myserver.com/foo/bar/test.html
我正在使用这种方式来获取路径:
"/excursion/$path**" (controller:"excursion", action:"sweet")
但它对文件扩展名没有帮助......如何禁用文件扩展名截断?
附言
class ExcursionController {
def defaultAction = "sweet"
def sweet = {
render "${params.path}"
}
}
请求http://myserver.com/excursion/foo/bar/test.html
结果是没有扩展名的“foo/bar/test”:(