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 6850301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:06:27+00:00 2026-05-27T01:06:27+00:00

How to show response in webview? HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost =

  • 0

How to show response in webview?

HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://mymobilece.com/api/api_getexammaterials.php?id=27");
HttpResponse response = httpclient.execute(httppost);
String responseBody = EntityUtils.toString(response.getEntity());
System.out.println("Respnce body :: " + responseBody);
bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));

StringBuffer stringBuffer = new StringBuffer("");
String line = "";
String LineSeparator = System.getProperty("line.separator");

while ((line = bufferedReader.readLine()) != null) {
        stringBuffer.append(line + LineSeparator);
    }
bufferedReader.close();

Toast.makeText(View_Materials_Activity.this, "Finished", Toast.LENGTH_LONG).show();

String webData = stringBuffer.toString();
String webData1 = URLDecoder.decode(webData);
System.out.println("data :; " + webData1);
webView.loadData(webData, "text/html", "UTF-8");
webView.loadDataWithBaseURL("http://www.ilias.de/docu/", webData,"text/html", "UTF-8", "about:blank");

Responce body ::

    ýb>&ª4+ü"ðÐôí{Á>
            Ó~5xGåYxôùuo_xƾԭ§¶·:7<5áË]SKפÿ��^ Ï|ÿ��si÷ú©­þÏî|9â©,u¿ê±x+ámö§¨kW?4¸ÔE¼>){íTÑ|Cá{-SÄ^Õ´ý+Ç~Õ¼'w6¯¡Ú.+ [ðã§üãâ-¶ºÚìá¦ø"ÖÏá÷>+êñøá¿Ã­#IÃÚF¥üWñ
            ¼ºâSÂñê7?Ä[_Ï¢êZ¥1_Qiü¿ìÍpé Gìéû`þÇ÷Þ:ðÿ��þ|×<«|GÔí<    ·¤xoáôíAü9­ê|òÁ㨵KëOIñ/L¾N¶Ónu;ujþÒu{
            Äv?üàü%±xCLðÅO\Ïñg_ø+±á­A×ôãíOÛ&6¡¥ø¢èÚ[jÚ¼3¥Ø_]üzÆ£m¨½hz¹´��ð_~Û?°¤(ñ    ðwÀ;­KVñ&¥©x+ÄÖái¦xRøªøÏÄz
            ö§ãë;
            \xÿ��ì¾3Öåá¤Ò|A}¨
            ûBó_ñ.¤ßr¾%øßûüøýã_º§ìð÷Â^ð:õ¯é'Ã;»[Ãþð×Å5}2ïQÒeÁÚì_õË[=SV¸å¼Eý¨5K4ÐuYõ6ü=ñçö?õZo졦Ùü/o|?¶Ðt¿^îæ×IýücûBÜøÿ��Â]°¶Ó´oü<ñ×Åm:&¾×EÞ«®izsiâ¸ìÿ��µ¯ì?áÝOZðÝ¿ìÉ«C®|bѼ'¢x×NÓ¼ð¢óþO\é®{©ê67Jø¦Yi~Õ<]âØôâOÚè¾xÛþØ?°Gü%àßZþËlzçf·Ñ|5
            §>èÑ뺤øuâ~h<Ï_j:Gôý2_    éz­-íô-/J¸GobäMøïûů|CÔ.gOVñ£ûB|Bñ§ü
  • 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-27T01:06:27+00:00Added an answer on May 27, 2026 at 1:06 am

    As you can see, an HTTP response is not HTML. It’s HTTP. It might contain HTML. Use HttpResponse.getEntity and then Entity.getContent and you can read the data (presumably HTML) from the stream. Then you can use WebView.loadData to load that data.

    Update:
    Your data might also be gzipped… Take a look at this other SO post for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Uploadify: show error message from HTTP response I am trying to get
For parsing JSON like this twitter API users/show response I've been using Jackson and
I am using Google Direction API. In this i am http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los+Angeles,CA&mode=driving,OK&sensor=false . When i
Is there a way to overwrite the http response headers returned in Jmeter? I'm
I've successfully installed this jQuery-based signup form here: http://net.tutsplus.com/tutorials/javascript-ajax/building-a-sleek-ajax-signup-form/ But when I applied it
//FID is an array Response.Redirect(show.aspx?id= + ID + &name= + NAME + &fileid= +
How to display xml response already formatted in html (IE won't show anything after
In response to an event this is executed: $.getScript('nav.php?node=' + node); nav.php returns the
I have Json response from my database . I am using Php for this
I've tried this example and it works fine with the example URL ( http://search.yahoo.com/search

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.