You'll need to use a library to retrieve the content via HTTP (HttpClient, for example) and something to parse the response (SAX).
Avoid using scriptlets for doing this, encapsulate your logic in classes and try creating custom tags, or better yet, try using something like Spring's MVC.