However, when the browser displays this information, it lops off the newlines and shows it all in one line thus: IP_address: 188.8.131.52 Subnet: 184.108.40.206 Subnet_mask: 255.255.255.0 Router1: 220.127.116.11 Router2: 18.104.22.168
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.