Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6965889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:07:12+00:00 2026-05-27T16:07:12+00:00

I am retrieving the whole html and javascript of a page I get from

  • 0

I am retrieving the whole html and javascript of a page I get from an HttpGet. I can successfully get the Html and the Javascript. When I try and load it into the web view, the web view gives me “Page not available” and shows the html and javascript that was to be loaded in a really weird format with percentages in between the elements. I am positive the html and javascript is being downloaded and in the shape of an Html page. I have also enabled javascript in the web view. What could be causing such a problem? Code:

public void parseDoc() {
    new Thread(new Runnable() {

        @Override
        public void run() {
            String summary = "<html><body>You scored <b>192</b> points.</body></html>";
            sting.loadData(summary, "text/html", null);
            HttpParams params = new BasicHttpParams();
            HttpClientParams.setRedirecting(params, true);
            httpclient = new DefaultHttpClient();

            httppost = new HttpPost(
                    "https://secure.groupfusion.net/processlogin.php");
            String HTML = "";
            try {
                List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(
                        3);
                nameValuePairs
                        .add(new BasicNameValuePair(
                                "referral_page",
                                "/modules/gradebook/ui/gradebook.phtml?type=student_view&jli=t&jli=t&jli=t&jli=t&jli=t&jli=t&printable=FALSE&portrait_or_landscape=portrait"));
                nameValuePairs.add(new BasicNameValuePair("currDomain",
                        "beardenhs.knoxschools.org"));
                nameValuePairs
                        .add(new BasicNameValuePair("username", user));
                nameValuePairs
                        .add(new BasicNameValuePair("password", pass));
                httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

                HttpResponse response = httpclient.execute(httppost);
                HTML = EntityUtils.toString(response.getEntity());
                Document doc = Jsoup.parse(HTML);
                Element link = doc.select("a").first();
                linkHref = link.attr("href");

                HttpGet request = new HttpGet();
                try {
                    request.setURI(new URI(linkHref));

                } catch (URISyntaxException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                response = httpclient.execute(request);

                InputStream in = response.getEntity().getContent();
                BufferedReader reader = new BufferedReader(
                        new InputStreamReader(in));
                StringBuilder str = new StringBuilder();
                String line = null;
                while ((line = reader.readLine()) != null) {
                    str.append(line);
                }
                in.close();
                HTML = str.toString();
                sting.loadData(HTML, "text/html", null);

            } catch (ClientProtocolException e) {
            } catch (IOException e) {
            }

        }
    }).start();

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:07:13+00:00Added an answer on May 27, 2026 at 4:07 pm

    Try to load WebView using following method

    mWebView.loadDataWithBaseURL(null, htmlString,"text/html", "utf-8", null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm retrieving a float value from a mysql database on a php page (2.5,
I'm trying to download and parse the HTML of a web page. Recently, the
Can anyone point out the flaw in this code? I'm retrieving some HTML with
My app is retrieving text from a web service in chunks. I am displaying
i posted some data using tinymce (in a symfony project).while retrieving back how can
When retrieving a lookup code value from a table, some folks do this... Dim
When retrieving objects from an NSMutableArray in cocoa-touch is the below code ok? Should
When retrieving values from a DataRow is it better to use the column name
When retrieving packages with Cabal, I frequently get errors with this message: user error
I am retrieving 3 fields from a database, and by default, only the username

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.