However, when the browser displays this information, it lops off the newlines and shows it all in one line thus: IP_address: 184.108.40.206 Subnet: 220.127.116.11 Subnet_mask: 255.255.255.0 Router1: 18.104.22.168 Router2: 22.214.171.124
How do I force the browser to respect my newlines? I do not want to send it in HTML as this page will be read by wget and parsed and I want to keep it simple.
When a response gets to the browser, it doesn't matter whether Java was used on the back end or not. The browser has no way of knowing. Therefore, the response must not be in the format that you think it is. The next step is for you to obtain a tool that will allow you to inspect the response as returned to the browser and see what's wrong with it.