Change default homepage in root path to servlet with doGet

前端 未结 2 547
遥遥无期
遥遥无期 2020-11-22 10:22

I have a small maven (indirectly through Netbeans 8.1 & tomcat setup)

And whenever I ran the project it opens the browser with a HelloWord on the root:

2条回答
  •  一整个雨季
    2020-11-22 10:52

    Whenever you define a index.jsp in web.xml the landing page, when you launch the application will be index.jsp page i.e by default the servlet path will be "/index.jsp" (http://localhost:8084/index.jsp). However in the browser that won't be displayed. In your servlet class you can match this pattern and redirect to some other page if required.

提交回复
热议问题