javaweb設置為servlet為默認首頁的方法
servlet頁面
@WebServlet(name = "ServletIndex", value="/index")
web.xml配置如下
<welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list>
訪問域名默認首頁就會訪問/index
javaweb設置為servlet為默認首頁的方法
servlet頁面
@WebServlet(name = "ServletIndex", value="/index")
web.xml配置如下
<welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list>
訪問域名默認首頁就會訪問/index