如题

解决方案 »

  1.   

    在Tomcat\conf\web.xml:
        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
      

  2.   

    新建站点:把你写好的web工程放到tomcat的安装目录下的webapps的文件夹下面
    tomcat就会自动加载这个站点,不需要别的配置,如果你有Eclipse的话,
    可以自动帮你部署,修改欢迎页面
    如上面的兄弟所说:
      <welcome-file-list>
            <welcome-file>your.html</welcome-file>//加上你想要的页面        <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
      

  3.   

    我想楼主的意思是,一个sdsd.war的包,部署后如何使用localhost就访问,而不是localhost/sdsd再访问。
    我也想知道。谢谢。
      

  4.   

    多装几个tomcat,每个用不同的端口
      

  5.   

    你有一个index.htm,index.aspx或者index.jsp就可以了
      

  6.   

    如果你想每个站点不同的端口,那肯定得多装几个服务器,tomcat,iis....
      

  7.   

    安装好Tomcat后,直接登上admin页面去配置
      

  8.   

    http://localhost:8080/admin中改.或改server.xml:()
      <Service name="Catalina">
        <Connector URIEncoding="GBK" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
        </Connector>
        <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
        </Connector>
        <Engine defaultHost="localhost" name="Catalina">
          <Host appBase="webapps" name="localhost">
            <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
          </Host>
          <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
        </Engine>
      </Service>
     
      <Service name="lydvqqService">
        <Connector URIEncoding="GBK" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="9999" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
        </Connector>
        <Connector port="7777" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
        </Connector>
        <Engine defaultHost="localhost" name="lydvqqEngine">
          <Host appBase="lydbase" name="localhost">
            <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
                  <Context displayName="JasperReports" docBase="C:\Tomcat5\lydbase\jas" path="/jas" >
    </Context>
          </Host>
          <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
        </Engine>
      </Service>http://localhost:9999/jas/index.jsp
    其中:              <Context displayName="JasperReports" docBase="C:\Tomcat5\lydbase\jas" path="" >
    </Context>是设定路径的.

    http://localhost:8080/jas/index.jsp
      

  9.   

    其中:              <Context displayName="JasperReports" docBase="C:\Tomcat5\lydbase\jas" path="" >
    path=""就可以
    http://localhost:9999/index.jsp