you'd need to change the resolution order in the prefix policy table. I suspect however that this will not solve whatever problem you are having since 127.0.0.1 is ::1. Is tomcat is not getting a response back on the v4 stack (if its trying to connect to localhost on v4) there is some other problem going on. unless you have unbound v4 from the NIC you will always get v4 answers from the v4 stack and v6 answers from the v6 stack
To do so in
Add (If it does not exist)
Key: DisabledComponents as a DWORD (32-bit) Value
1.Find the current value data of DisabledComponents.
2.Change the data to binary data. It will be a 32-bit binary value.
3.Find the sixth bit of the data, and then set it to 0. Do not change any other bits. For example, if the current data is 11111111111111111111111111111111, the new data should be 11111111111111111111111111011111.
4.Change the data from binary to hexadecimal.
5.Set the hexadecimal value as the new value data for DisabledComponents.