您好,欢迎来到爱玩科技网。
搜索
您的当前位置:首页输入域名,localhost,直接跳转到controller的几种方式:

输入域名,localhost,直接跳转到controller的几种方式:

来源:爱玩科技网
输入域名,localhost,直接跳转到controller的几种方式:
(1),在web.xml中写如下
        <welcome-file-list>
        <welcome-file>welcome.html</welcome-file>
    </welcome-file-list>
然后在建立welcome.html,在里面用js或者jsp的request,response方式,或者<meta http-equiv="refresh" content="0; url=index.d">


(2)或者在<welcome-file-list>
        <welcome-file>index.d</welcome-file>
    </welcome-file-list>
然后建立一个空的index.d文件,最后要保证index.d的controller要存在,这样就直接跳转到index.d的controller。

(3)使用spring mvc或者是struts的xml中配置默认跳转地址

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- aiwanbo.com 版权所有 赣ICP备2024042808号-3

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务