I met a problem when I do GWT unit test.My GWT unit test can only succeed when my laptop disconnected from network, otherwise I receive the following error:
Starting http://192.168.1.103:65517/com.example.TestWebApp.JUnit/junit.html?gwt.codesvr=192.168.1开发者_如何学Python.103:65513 on browser FF3 logging for HtmlUnit thread [ERROR] I/O error on HTTP request org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.103:65517 refused
Please help, Thank you!
I suspect that when you're connected to the network, localhost
is resolving to 192.168.1.103, and your servlet container is bound only to 127.0.0.1
When you're not connected to the net, localhost
resolves to 127.0.0.1 and everything works fine.
I had the same problem, worked when I disabled network or by changing my hostname to something else than localhost
精彩评论