I need to access the virtual-host element, but I don’t know how to access the contents of this file programatically.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Fire up your favourite programming language that understands XML and parse the server.xml file. Use XPath to locate the element you’re interested in and change it. Then write the server.xml file back out again.
If you’re into Java and DOM then something like this would get you started: