日期:2014-05-18  浏览次数:20752 次

网站发布问题!!
如果直接访问域名的话默认是直接访问你的index.html或是index.jsp,想请教怎么跟我的action联系起来啊?意思就是访问域名是同时是可以访问我的action的,因为要把后台的数据导出到前台来!!

------解决方案--------------------
用iframe,src指向你的action
------解决方案--------------------
web.xml

<welcome-file-list>
<welcome-file>index.action</welcome-file> 
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

如是你是index.do或其它可以把index.action换成其它
选后决定优先权.

------解决方案--------------------
你不是直接就访问到了index.jsp页面吗?你在index.jsp页面里面写一个跳转。让他跳到你的action中去
比如:
在index.jsp中可以这样做:
<% response.sendRedirect("introductionAction!finAll.action"); %>
------解决方案--------------------
直接在页面中onload事件中给一个javascript函数来处理(AJAX),这个函数传一个url的参数在index.action中查询数据库,并将结果集返回到页面就可以了(XmlHttpRequest.responseText)。