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

web.xml 中 welcome-file 为action的解决直接在welcome-file 标签内放置action是不能实现的,但是可以通过2

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>