怎样在tomcat中新建站点,怎样修改起始页? 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在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> 新建站点:把你写好的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> 我想楼主的意思是,一个sdsd.war的包,部署后如何使用localhost就访问,而不是localhost/sdsd再访问。我也想知道。谢谢。 多装几个tomcat,每个用不同的端口 你有一个index.htm,index.aspx或者index.jsp就可以了 如果你想每个站点不同的端口,那肯定得多装几个服务器,tomcat,iis.... 安装好Tomcat后,直接登上admin页面去配置 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 其中: <Context displayName="JasperReports" docBase="C:\Tomcat5\lydbase\jas" path="" >path=""就可以http://localhost:9999/index.jsp 崩溃求助大虾,关于ClassLoader如何加载指定class 在1至100范围内产生50个随机数,打印到控制台,取出所有的偶数降序排列后打印到控制台。 请教 hibernate 调用save()方法时异常 什么原因啊 关于JTabbedPanel的问题 请教各位大虾 请问了 如何使焦点落在JTextField上后,输入值必须满足一定条件后才可以离开? 为什么我的JAVA程序编译通过了,但却不能执行? 一个关于运行多态的基础问题 郁闷中,我的程序到底怎么啦?求大虾帮我看看 jsp问题 大侠帮忙
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
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>
我也想知道。谢谢。
<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
path=""就可以
http://localhost:9999/index.jsp