1

我有一个映射到 URL 模式的前端控制器/Controller,因此可以在http://localhost:8080/myproject/Controller. 如何配置我的 Web 应用程序,以便主页http://localhost:8080/myproject自动重定向到它?

4

1 回答 1

1

最简单的方法之一是将其注册为<welcome-file>in web.xml

<welcome-file-list>
    <welcome-file>Controller</welcome-file>
</welcome-file-list>
于 2012-09-13T01:04:54.437 回答