简体   繁体   中英

tomcat welcome file is not sitting in its relative path

I have an application that have in the root 2 folders I want the welcome file to be under the folder

dist/index.html So i add my welcome file like this :

<welcome-file-list>
    <welcome-file>dist/index.html</welcome-file>
</welcome-file-list>

project looks like this 

    application
       -dist/index.html
       -app/index.html

what happen is that it works fine but all the scripts that are in the html file are not found and i get 404 for them. when i directly go to the folder without using the welcome it will load just fine application/dist/index.html
Any idea ?

感谢您的回答,事实证明,如果您想使用context标签,则应用程序应位于服务器之外,因此我尝试了另一种方法,它可以正常工作

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM