Renaud is Not Bill Gates
Renaud is Not Bill Gates

Reputation: 2084

Default start page for web application in eclipse

I have a web application, and I want to set a servlet as the default index page :

This is the link for my servlet :

http://localhost:8080/qcm/Accueil

I want when I write this link : http://localhost:8080/qcm, to open the Accueil servlet.

How can I do this ?

when I googled about it I found that I have to change the welcome-file-list in web.xml, bu there is no web.xml file in my project.

Upvotes: 0

Views: 1124

Answers (1)

Petr Mensik
Petr Mensik

Reputation: 27496

Yes, that is right. web.xml should be located in your src/main/webapp/WEB-INF directory (if you use standard Maven layour) - if not, just place it under the WEB-INF folder in your project. You can copy it from this tutorial and just add

<welcome-file-list>
    <welcome-file>qcm</welcome-file>
</welcome-file-list>

on the end, that should do it.

Upvotes: 2

Related Questions