Index.html 已删除,但浏览器仍会在 运行 Web 应用程序上加载它?
Index.html is deleted but still browser loads it upon running the web application?
我是网络开发的新手,我正在通过在线教程自学网络开发。
我的问题:
这是我的第一个 Web 应用程序,我删除了 netbeans 在创建 Web 应用程序时默认提供的原始 index.html,而是将我的欢迎页面创建为 register.html
我在我的部署描述符中正式将欢迎文件指定为 register.html:
<welcome-file-list>
<welcome-file>register.html</welcome-file>
</welcome-file-list>
但问题是每当我 运行 我的项目时,它仍然在浏览器上显示 index.html(我已经删除)作为我项目的主页。
即
**localhost:8080/myprojectname/** is still showing the index.html which is not even there and not my register.html which I mentioned in my deployment descriptor.
我两个小时前才开始学习网络开发,我知道我犯了一些严重的错误,请任何人指出我的错误并帮助我。
谢谢!
您是否尝试过清除浏览器缓存?
如果没有,那么一种方法是:
- 打开googlechrome,按F12,这将打开调试器。
- 现在在浏览器本身上,长按刷新按钮,它会显示一个包含 3 个选项的下拉菜单。
- Select最后一个:"Empty cache and Hard reload"
这应该会清除缓存并在刷新时,您的 html 文件应该不再可用。
我是网络开发的新手,我正在通过在线教程自学网络开发。
我的问题:
这是我的第一个 Web 应用程序,我删除了 netbeans 在创建 Web 应用程序时默认提供的原始 index.html,而是将我的欢迎页面创建为 register.html
我在我的部署描述符中正式将欢迎文件指定为 register.html:
<welcome-file-list>
<welcome-file>register.html</welcome-file>
</welcome-file-list>
但问题是每当我 运行 我的项目时,它仍然在浏览器上显示 index.html(我已经删除)作为我项目的主页。 即
**localhost:8080/myprojectname/** is still showing the index.html which is not even there and not my register.html which I mentioned in my deployment descriptor.
我两个小时前才开始学习网络开发,我知道我犯了一些严重的错误,请任何人指出我的错误并帮助我。
谢谢!
您是否尝试过清除浏览器缓存? 如果没有,那么一种方法是:
- 打开googlechrome,按F12,这将打开调试器。
- 现在在浏览器本身上,长按刷新按钮,它会显示一个包含 3 个选项的下拉菜单。
- Select最后一个:"Empty cache and Hard reload"
这应该会清除缓存并在刷新时,您的 html 文件应该不再可用。