Creating a custom server.xml file with Tomcat

Typically, when you run your web application using Tomcat in the JBuilder IDE, JBuilder creates a serverXXXX.xml file (where XXXX is the port number Tomcat is listening to)and deletes it when you shut down Tomcat. You can edit the file and force JBuilder to keep it.
To create a custom server.xml file:
1.Run your web application in JBuilder as you normally would.
2.Go to your project’s Tomcat/conf directory while Tomcat is running. This folder is created by JBuilder when your web application is running.
3.Make a copy of the conf directory in a temp directory.
4.Open serverXXXX.xml in the conf directory in a text editor.
5.Remove the second line of the file:<!--This comment marks this file as generated, so it may be deleted and regenerated at any time. To preserve manual changes to this file, delete this comment.--> With this line removed, JBuilder will not automatically delete the file when you stop the server.
6.Make other changes to the server configuration file as needed. (Save the file and leave it open in the editor.)
7.Go back to JBuilder and shut down Tomcat.
8.Save the edited file to the copy of the conf directory.
9.Copy the conf directory back to your project’s Tomcat directory.
10.Restart the web server and your web application.
Now, when you re-start the web application and the web server, your edited serverXXXX.xml file will be used instead of an auto-generated one.
 

 

--摘自JBuilder2005 Developing Applications for J2EE™ Servers文档
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值