You can submit an HTTP post/get to query your servlet to get your xmlfile content.Search java.net.URLConnection and java.net.HttpURLConnection forsample codes.