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