单独的tomcat(用8080访问)是可以使用一个servlet作为welcome-file的,但整合Tomcat+Apache+mod_jk之后, 好像在apache中访问时,不能将*.jsp或servlet作为欢迎页面???如.现有欢迎页面: www.myweb.com/index.do
使用www.myweb.com:8080访问时, 可自动访问到index.do
但使用www.myweb.com访问时,则无效.
请大家给给意见...........(不想要什么index.html文件转发之类的)

解决方案 »

  1.   

    做一个index.htm,内容是URL跳转
    或者再给你那个Servlet做个映射到index.htm我只是这么想的,不知道行不行。
      

  2.   

    做个JK配置,你现在应该是将jsp转交tomcat处理,
    你也可以多加一个,如果www.myweb.com是访问的连接,那么也交给tomcat处理
      

  3.   

    to:miaoliujun(傲龙) 
    我就是不想将www.myweb.com整个站点都交给tomcat. 只是想给它.do我看到apache站点看到一些东东,好点有点作用, 英文不好,那位再帮看看JkOptions ForwardDirectories能不能解决这个问题, 不过我试了好象不行:
    JkOptions ForwardDirectories is used in conjunction with DirectoryIndex directive of Apache web server. As such mod_dir should be available to Apache, statically or dynamically (DSO) 
    When DirectoryIndex is configured, Apache will create sub-requests for each of the local-url's specified in the directive, to determine if there is a local file that matches (this is done by stat-ing the file). If ForwardDirectories is set to false (default) and Apache doesn't find any files that match, Apache will serve the content of the directory (if directive Options specifies Indexes for that directory) or a 403 Forbidden response (if directive Options doesn't specify Indexes for that directory). If ForwarDirectories is set to true and Apache doesn't find any files that match, the request will be forwarded to Tomcat for resolution. This is used in cases when Apache cannot see the index files on the file system for various reasons: Tomcat is running on a different machine, the JSP file has been precompiled etc. Note that locally visible files will take precedence over the ones visible only to Tomcat (i.e. if Apache can see the file, that's the one that's going to get served). This is important if there is more then one type of file that Tomcat normally serves - for instance Velocity pages and JSP pages. 
      

  4.   

    呵..最土的方法是看源码.
    靠, 原来tomcat在map welcome file时, 如果遇到后缀匹配时, 要去web文件夹下找相应的文件, 当文件存在时才可以. 
    所以, 在web目录下新建一个空白的index.do就可以了.