In the absence of web.xml
, where is the welcome file configuration?
background:
10.10 Welcome Files
Web Application developers can define an ordered list of partial URIs called welcome files in the Web application deployment descriptor.
Java Servlet Specification Version 3.0 Rev a December 2010
I'm using Netbeans 8 and didn't realize that web.xml
duties are now largely done with annotations. However, I can't seem to find an annotation relating to welcome files. Currently, index.html
loads, I'd like to reconfigure that to foo.jsp
. Can this be done without creating a web.xml
file?
see also:
https://stackoverflow.com/a/19317470/262852
update:
I added:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>foo.jsp</welcome-file>
</welcome-file-list>
</web-app>
as web.xml
and it works fine -- but would like to accomplish the same result without xml
.