不明白你要表达的意思。如果你想把某个action作为首页,直接在web.xml中的welcome-files中添加就可以了。

解决方案 »

  1.   

    比如说index.jsp里面有数据,我打入地址之后,它不会先运行ACTION的,是先运行JSP,如何先得到ACTION的数据来填充JSP
      

  2.   

    在web.xml中的<welcome-file-list>中添加你的action 的url
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>比如你的action的URL是/index.do。那么就在
    <welcome-file-list>
                    <welcome-file>/index.do</welcome-file>
    </welcome-file-list>就可以了。