当前位置: 代码迷 >> Web前端 >> web.xml 中 welcome-file 替action的解决
  详细解决方案

web.xml 中 welcome-file 替action的解决

热度:184   发布时间:2013-03-19 17:22:05.0
web.xml 中 welcome-file 为action的解决

直接在welcome-file 标签内放置action是不能实现的,但是可以通过2种方法委婉实现

?

一.?<welcome-file>index.html</welcome-file>,?

index.html内容:?<meta http-equiv='refresh'? content='0;url=xxx.action'>?

?

二.?在index.html写上这么一段:?

<script language="javascript">?
location.replace("xxx.action");?
</script>

  相关解决方案