Have an application with SpringMVC+AngularJS. Have place the index.html page in src/main/webapp/app/src/index.html.
In web.xml have
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
The application works with
http://localhost:8080/myapp/app/index.html
But not with http://localhost:8080/myapp What changes should be made so that the application is directed to the index.html page correctly
Try to replace
<welcome-file>index.html</welcome-file>
with
<welcome-file>app/index.html</welcome-file>
I am assuming that you have any InternalResourceViewResolver
configured. You have to make 2 changes. 1. Change welcome-file in web.xml like below
<welcome-file-list>
<welcome-file>app/src/index.html</welcome-file>
</welcome-file-list>`
<mvc:resources mapping="/app/src/**" location="/app/src/"/> <mvc:default-servlet-handler />
You can google for annotations for above configuration if you are having annotation based configuration.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.