2012-09-13 62 views
1

我有一個前端控制器映射到/Controller的URL模式,因此在http://localhost:8080/myproject/Controller上可用。如何配置我的Web應用程序,以便http://localhost:8080/myproject上的主頁自動重定向到它?將主頁重定向到前端控制器

回答

1

最簡單的方法之一是在web.xml中將其註冊爲<welcome-file>

<welcome-file-list> 
    <welcome-file>Controller</welcome-file> 
</welcome-file-list> 
+0

非常感謝你 – Hipny

+0

不客氣。 – BalusC