【发布时间】:2015-05-22 09:47:40
【问题描述】:
如果用户输入无效的网址,我如何重定向到错误页面。现在,如果 URL 无效,播放会显示路线。
已按以下顺序尝试了这些路线:
Not found
GET /log
These routes have been tried, in this order :
GET /@documentation/cheatsheet/{category} PlayDocumentation.cheatSheet
GET /@documentation/modules/{module}/files/{name} PlayDocumentation.file
GET /@documentation/modules/{module}/images/{name} PlayDocumentation.image
GET /@documentation/modules/{module}/{id} PlayDocumentation.page
GET /@documentation/files/{name} PlayDocumentation.file
GET /@documentation/images/{name} PlayDocumentation.image
GET /@documentation/{id} PlayDocumentation.page
GET /@documentation/? PlayDocumentation.index
GET /public/ staticDir:public
出于多种原因,我确实想向用户显示路线。如何重定向到错误页面?
【问题讨论】:
-
你尝试过全局对象吗?
标签: playframework playframework-1.x