JSP项目默认打开默认是http://localhost:8080/webNAME
在web.xml里面<welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>但是我现在网站打开是就要去访问数据库显示很多数据在首页上面,我现在的做法是在index.jsp里面的head里面加入
<meta http-equiv="refresh" content="0;url=front/show">这句代码刷新去请求Action,所以打开网站就变成了
http://localhost:8080/webNAME/front/show
我该怎么去让去掉后面的请求呢?<welcome-file-list>里面不能写动态请求路径

解决方案 »

  1.   

    你让JSP页面显示数据有很多方法啊 你可以写一个小脚本 然后再跳回到主页不就OK了
      

  2.   

    <welcome-file-list>
          <welcome-file>front/show</welcome-file>
      </welcome-file-list>
    这样写 打开 http://localhost:8080/webNAME这个url应该就可以了
      

  3.   

    index.jsp加入
    <jsp:forward page='front/show'/>
      

  4.   


    <%@ page contentType="text/html;charset=gb2312" import="java.util.*"language="java"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    <html>   
      <head>   
      <TITLE>title</TITLE>   
      </head>   
      <frameset   cols="0,*"   frameborder="NO"   border="0"   framespacing="0">   
      <frame   scrolling="NO"   noresize>   
      <frame   src="http://cyfy.bjchyedu.cn/cyfy/portal.do?act=indexList">//SRC改成自己的就可以了!   
      </frameset>   
      </html>用这个就可以。
      

  5.   

    觉得楼主用框架吧。
    比如Velocity 就可以啊。
    这个可以实现静态化。
      

  6.   

    伪静态??我用的urlrewrite已经把url伪装了,只是后面不喜欢加html后缀等东西