0
我有一个Web应用程序,我有一个问题 如果网页并不在我的应用程序存在我有以下错误页面如何捕捉一个HTTP 404在Java中
HTTP Status 404 - /myapplication/department/home.html
type Status report
message /myapplication/department/home.html
description The requested resource (/myapplication/department/home.html) is not available.
我要转发用户访问索引页面,如果出现这种问题,不知道该怎么办
非常感谢如果index.jsp位于home.html页面的一个文件夹中,那该怎么办。我试图写 ../index.jsp 但它不起作用。你能告诉我如何退回到URL –
Bachayer
这个给出的例子应该已经这样做了。前导斜杠'/'使其相对于webapp的上下文根。它会显示'/ myapplication/index.jsp'。 – BalusC
好吧,我试过它显示/myapplication/department/index.jsp。 – Bachayer