Traditional Culture Encyclopedia - Weather inquiry - Java clients and servers access other addresses.

Java clients and servers access other addresses.

You mean that your server's web page can't capture the weather forecast, right? Are there two ways to forward jsp requests? One is that the user makes a request? Go to your server. Your server received the request? Found that additional data is needed? So I sent another request to another network? This is equivalent to two requests, and the other is a request from the user? The server found that it needs additional data? Then redirect the user's request directly to another network. I guess you need a second service to redirect users' requests directly to the weather forecast? Let the weather forecast service think that you didn't send this request? Is the user sending RequestDispatcher.forward (), response.sendRedirect ()? What seems to be the second method? You can test whether you can use these two methods to redirect the address that requests the weather forecast. See if you can get the data.

If it really doesn't work, is it possible to grab the weather forecast web service elsewhere? Very simple

On this website, you can get the weather forecast by clicking on the red circle.