In Netbeans, by default, when creating a project without added frameworks, a deployment descriptor (web.xml) is not provided. To change it, right-click on the project and select New>Other>web>Standard Deployment Descriptor(web.xml)
Now edit the web.xml file and install
<welcome-file-list> <welcome-file>newjsp.jsp</welcome-file> </welcome-file-list>
To change the default value to newjsp.jsp
UPDATE
Explicitly for tomcat ....
If web.xml is not specified in the application, the default web.xml ($ CATALINA_HOME / conf / web.xml) Tomcat is provided to the application. This deployment descriptor has the following lines:
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list>
This is why index.jsp is displayed by default
MaVRoSCy
source share