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

解决方案 »

  1.   

    在web.xml里面配置,貌似是这样
      

  2.   

    如果你的we.xml有默认访问的JSP/HLMT,直接访问项目名,就会显示该页面!
        你可以做个过滤器,在用户发送请求时,init里面初始化!
      

  3.   

    we.xml文件中
    index.jsp

    index.html
    放的位置有关,
    哪个放前面,那个先访问
      

  4.   

    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换成其它
    选后决定优先权.
      

  5.   

    web.xml文件中把welcome-file标签中的index。jsp改成你要的action的名字就可以了
      

  6.   

    你不是直接就访问到了index.jsp页面吗?你在index.jsp页面里面写一个跳转。让他跳到你的action中去
    比如:
    在index.jsp中可以这样做:
    <% response.sendRedirect("introductionAction!finAll.action"); %>
      

  7.   

    <welcome-file-list>
      <welcome-file>index.action</welcome-file>  
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
      </welcome-file-list>先写的先选,第一个没有选第二个,前面选了,后面就不执行了。
      

  8.   

    直接在页面中onload事件中给一个javascript函数来处理(AJAX),这个函数传一个url的参数在index.action中查询数据库,并将结果集返回到页面就可以了(XmlHttpRequest.responseText)。