How to configure jsp using deployment descriptor(web.xml)
To map jsp files inside of java servlets, use the element <jsp-file> inside the <servlet> element as shown in the example below.
As done while mapping servlets, a <servlet-mapping> element has to be used to specify the url/s to map to the jsp given in <jsp-file> element
As done while mapping servlets, a <servlet-mapping> element has to be used to specify the url/s to map to the jsp given in <jsp-file> element
<web-app> <servlet> <servlet-name>welcomePage</servlet-name> <jsp-file>/sectionA/welcome.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>welcomePage</servlet-name> <url-pattern>/main/welcome.do</url-pattern> </servlet-mapping></web-app>