I created a web project using maven using:
mvn archetype:generate -DgroupId=com.test -DartifactId=ioehr -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
then imported project in eclipse and modified the web.xml file to add welcome file entry as:
<web-app>
<display-name>test</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
by default this was the project structure
--src
-----main
---------webapp
---------------WEB-INF
----------------------web.xml
---------------index.jsp
--WebContent
-----WEB-INF
------------lib
------------web.xml
-----pom.xml
And then try to run project on server. and it gave me exception as
The requested resource (/test/) is not available.
And when I moved index.jsp to WebContent folder it shows me the welcome page.
My question is , Why I manually needed to move index.jsp in WebContent folder.
Why it didn't work in webapp folder