Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Application Server  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 请教:关于tomcat5.0的server.xml的配置问题
newclack





发贴: 2
积分: 0
于 2005-06-27 10:01 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
最近在在%TOMCAT_HOME%\webapps中创建一个目录名字为'sree',是不是需要在server.xml中配置这个应用,该如何配置这个应用呢?希望有人指点一二.


作者 Re:请教:关于tomcat5.0的server.xml的配置问题 [Re:newclack]
lczhongj





发贴: 3
积分: 0
于 2005-06-30 17:55 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
需要进行配置,只有这样服务器才能找到你所定义的站点。
配置方法:
1. 在server.xml中找到<Context />节;
2.添加<Context path="/sree" docBase="sree" debug="0" privileged="true" />内容;其中docBase为你项目所保存的位置,可以是相对目录(如上面代码中所描述的),也可以是计算机中绝对路径(如d:\sree);path为地址栏中输入的地址,如http://localhost:8080/sree/中的sree;保存退出即可。
3.如果你的目录中有index.jsp作为整个项目的启动文件,可以配置web.xml来设置启动参数。打开web.xml,在文件的最后应能看到<!-- ==================== Default Welcome File List ===================== -->一节,如没有则添加以下代码:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
保存并关闭此文件即可;(<welcome-file-list>节存放项目的启动文件,按你所需的顺序来编辑启动文件)
4.重新启动tomcat,再打开浏览器输入相应地址即可。




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923