Multiple choice technology programming languages

Which is the correct definition of welcome files in web.xml?

  1. <welcome> <welcome-file>index.jsp</welcome-file> </welcome>

  2. <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list>

  3. <welcome-files> <welcome-file>index.jsp</welcome-file> </welcome-files>

  4. <welcome-files> <welcome>index.jsp</welcome> </welcome-files>

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In web.xml, welcome files must be defined within the element, with each file specified by a tag. This is the standard servlet specification syntax for configuring default files that load when a directory URL is accessed. The other options use incorrect element names that don't match the servlet specification.