请问tomcat如何实现访问http://****,跳转到http://****/web/my.jsp.

解决方案 »

  1.   

    可以使用forward、redirect……或者一个form表单提交
    不知道Lzy的展示页面时用什么写的
      

  2.   

    也可以通过filter或拦截器来实现
      

  3.   

    web.xml
    <!-- 欢迎界面-->
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
      

  4.   

    web.xml
    <!-- 欢迎界面-->
    <welcome-file-list>
    <welcome-file>/web/my.jsp.</welcome-file>
    </welcome-file-list>
      

  5.   

    也可以在Tomcat的配置文件中设置
      

  6.   

    转发:request.getRequestDispatcher("输入你要转发的网址名").forward(request, response);
    重定向:response.sendRedirect("输入你要转发的网址名")
      

  7.   

    在tomcat目录的root下的index.html的内容改为<script language="javascript" type="text/javascript">
       setTimeout("javascript:location.href='http://***'", 0); 
    </script> 在http://**** 页面中加上个跳转代码<%
    response.sendRedirect(request.getContextPath() + "/web/my.jsp");
    %>
      

  8.   

    总结以上各位答案:
    1:请求转发
    2:重定向
    3:javascript