How can I keep my parameters in my server.xml file?

By: Steve Peters

Abstract: My changes to the server.xml or server8080.xml keep vanishing.


Question:

How can I keep my parameters in my server.xml file?
 
Answer:

The server.xml or server8080.xml file is one that is generated by JBuilder when your web application runs. You cannot make manual additions or modifications to this file because JBuilder will always overwrite it when you run.

You can tell JBuilder that you want it to include certain custom parameters by adding them to web.xml file. In your web project, expand the WebApp node in the project pane to expose the Deployment Descriptors. Expand this to expose the web.xml file. Double-click the web.xml file to open the Deployment Descriptor editor. Now when you look in the lower-left pane (structure pane) you will see a number of entries. Context Parameters is the top entry. Click on this to open the Context Parameters editor. Now you can click Add to enter your own parameters and their values. JBuilder will read these values and add them to the server.xml file when it is created.

 

Server Response from: ETNASC03