{"id":26547,"date":"2021-04-28T23:10:06","date_gmt":"2021-04-29T03:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/primenumbers-java-servlet-that-processes-a-request-to-generate-n-prime-numbers-each-with-at-least-m-digits-if-these-results-are-not-complete-it-sends-a-refresh-header-instructing-the-browser-to-as\/"},"modified":"2021-04-28T23:10:06","modified_gmt":"2021-04-29T03:10:06","slug":"primenumbers-java-servlet-that-processes-a-request-to-generate-n-prime-numbers-each-with-at-least-m-digits-if-these-results-are-not-complete-it-sends-a-refresh-header-instructing-the-browser-to-as","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=26547","title":{"rendered":"PrimeNumbers.java  Servlet that processes a request to generate n prime numbers, each with at least m digits. If these results are not complete, it sends a Refresh header instructing the browser to ask for new results a little while later. Uses the Primes #Programming Code Examples #Java\/J2EE\/J2ME #Servlet"},"content":{"rendered":"<pre>\nPrimeNumbers.java  Servlet that processes a request to generate n prime numbers, each with at least m digits. If these results are not complete, it sends a Refresh header instructing the browser to ask for new results a little while later. Uses the Primes, PrimeList, and ServletUtilities  classes.\n\npackage cwp;\n\nimport java.io.*;\nimport javax.servlet.*;\nimport javax.servlet.http.*;\nimport java.util.*;\n\n\/** Servlet that processes a request to generate n\n *  prime numbers, each with at least m digits.\n *  It performs the calculations in a low-priority background\n *  thread, returning only the results it has found so far.\n *  If these results are not complete, it sends a Refresh\n *  header instructing the browser to ask for new results a\n *  little while later. It also maintains a list of a\n *  small number of previously calculated prime lists\n *  to return immediately to anyone who supplies the\n *  same n and m as a recent completed computation.\n *  <p>\n *  Taken from Core Web Programming Java 2 Edition\n *  from Prentice Hall and Sun Microsystems Press,\n *  .\n *  May be freely used or adapted.\n *\/\n\npublic class PrimeNumbers extends HttpServlet {\n  private Vector primeListVector = new Vector();\n  private int maxPrimeLists = 30;\n\n  public void doGet(HttpServletRequest request,\n                    HttpServletResponse response)\n      throws ServletException, IOException {\n    int numPrimes =\n      ServletUtilities.getIntParameter(request,\n                                       &quot;numPrimes&quot;, 50);\n    int numDigits =\n      ServletUtilities.getIntParameter(request,\n                                       &quot;numDigits&quot;, 120);\n    PrimeList primeList =\n      findPrimeList(primeListVector, numPrimes, numDigits);\n    if (primeList == null) {\n      primeList = new PrimeList(numPrimes, numDigits, true);\n      \/\/ Multiple servlet request threads share the instance\n      \/\/ variables (fields) of PrimeNumbers. So\n      \/\/ synchronize all access to servlet fields.\n      synchronized(primeListVector) {\n        if (primeListVector.size() &gt;= maxPrimeLists)\n          primeListVector.removeElementAt(0);\n        primeListVector.addElement(primeList);\n      }\n    }\n    Vector currentPrimes = primeList.getPrimes();\n    int numCurrentPrimes = currentPrimes.size();\n    int numPrimesRemaining = (numPrimes - numCurrentPrimes);\n    boolean isLastResult = (numPrimesRemaining == 0);\n    if (!isLastResult) {\n      response.setHeader(&quot;Refresh&quot;, &quot;5&quot;);\n    }\n    response.setContentType(&quot;text\/html&quot;);\n    PrintWriter out = response.getWriter();\n    String title = &quot;Some &quot; + numDigits + &quot;-Digit Prime Numbers&quot;;\n    out.println(ServletUtilities.headWithTitle(title) +\n                &quot;n&quot; +\n                &quot;<h2 ALIGN=\"CENTER\">&quot; + title + &quot;<\/h2>n&quot; +\n                &quot;<h3>Primes found with &quot; + numDigits +\n                &quot; or more digits: &quot; + numCurrentPrimes +\n                &quot;.<\/h3>&quot;);\n    if (isLastResult)\n      out.println(&quot;<b>Done searching.<\/b>&quot;);\n    else\n      out.println(&quot;<b>Still looking for &quot; + numPrimesRemaining +\n                  &quot; more...<\/b>&quot;);\n    out.println(&quot;<ol>&quot;);\n    for(int i=0; i&lt;numcurrentprimes ; i++) {\n      out.println(&quot;  <li>&quot; + currentPrimes.elementAt(i));\n    }\n    out.println(&quot;<\/li><\/ol>&quot;);\n    out.println(&quot;&quot;);\n  }\n\n  public void doPost(HttpServletRequest request,\n                     HttpServletResponse response)\n      throws ServletException, IOException {\n    doGet(request, response);\n  }\n\n  \/\/ See if there is an existing ongoing or completed\n  \/\/ calculation with the same number of primes and number\n  \/\/ of digits per prime. If so, return those results instead\n  \/\/ of starting a new background thread. Keep this list\n  \/\/ small so that the Web server doesn't use too much memory.\n  \/\/ Synchronize access to the list since there may be\n  \/\/ multiple simultaneous requests.\n\n  private PrimeList findPrimeList(Vector primeListVector,\n                                  int numPrimes,\n                                  int numDigits) {\n    synchronized(primeListVector) {\n      for(int i=0; i&lt;primelistvector .size(); i++) {\n        PrimeList primes =\n          (PrimeList)primeListVector.elementAt(i);\n        if ((numPrimes == primes.numPrimes()) &amp;&amp;\n            (numDigits == primes.numDigits()))\n          return(primes);\n      }\n      return(null);\n    }\n  }\n}\n\n\nPrimes.java\n\npackage cwp;\n\nimport java.math.BigInteger;\n\n\/** A few utilities to generate a large random BigInteger,\n *  and find the next prime number above a given BigInteger.\n *  <\/p><p>\n *  Taken from Core Web Programming Java 2 Edition\n *  from Prentice Hall and Sun Microsystems Press,\n *  .\n *  May be freely used or adapted.\n *\/\n\npublic class Primes {\n  \/\/ Note that BigInteger.ZERO was new in JDK 1.2, and 1.1\n  \/\/ code is being used to support the most servlet engines.\n  private static final BigInteger ZERO = new BigInteger(&quot;0&quot;);\n  private static final BigInteger ONE = new BigInteger(&quot;1&quot;);\n  private static final BigInteger TWO = new BigInteger(&quot;2&quot;);\n\n  \/\/ Likelihood of false prime is less than 1\/2^ERR_VAL\n  \/\/ Assumedly BigInteger uses the Miller-Rabin test or\n  \/\/ equivalent, and thus is NOT fooled by Carmichael numbers.\n  \/\/ See section 33.8 of Cormen et al's Introduction to\n  \/\/ Algorithms for details.\n  private static final int ERR_VAL = 100;\n\n  public static BigInteger nextPrime(BigInteger start) {\n    if (isEven(start))\n      start = start.add(ONE);\n    else\n      start = start.add(TWO);\n    if (start.isProbablePrime(ERR_VAL))\n      return(start);\n    else\n      return(nextPrime(start));\n  }\n\n  private static boolean isEven(BigInteger n) {\n    return(n.mod(TWO).equals(ZERO));\n  }\n\n  private static StringBuffer[] digits =\n    { new StringBuffer(&quot;0&quot;), new StringBuffer(&quot;1&quot;),\n      new StringBuffer(&quot;2&quot;), new StringBuffer(&quot;3&quot;),\n      new StringBuffer(&quot;4&quot;), new StringBuffer(&quot;5&quot;),\n      new StringBuffer(&quot;6&quot;), new StringBuffer(&quot;7&quot;),\n      new StringBuffer(&quot;8&quot;), new StringBuffer(&quot;9&quot;) };\n\n  private static StringBuffer randomDigit() {\n    int index = (int)Math.floor(Math.random() * 10);\n    return(digits[index]);\n  }\n\n  public static BigInteger random(int numDigits) {\n    StringBuffer s = new StringBuffer(&quot;&quot;);\n    for(int i=0; i 0)\n      numDigits = Integer.parseInt(args[0]);\n    else\n      numDigits = 150;\n    BigInteger start = random(numDigits);\n    for(int i=0; i&lt;50; i++) {\n      start = nextPrime(start);\n      System.out.println(&quot;Prime &quot; + i + &quot; = &quot; + start);\n    }\n  }\n}\n\n\n\nPrimeList.java\npackage cwp;\n\nimport java.util.*;\nimport java.math.BigInteger;\n\n\/** Creates a Vector of large prime numbers, usually in\n *  a low-priority background thread. Provides a few small\n *  thread-safe access methods.\n *  <\/p><p>\n *  Taken from Core Web Programming Java 2 Edition\n *  from Prentice Hall and Sun Microsystems Press,\n *  .\n *  May be freely used or adapted.\n *\/\n\npublic class PrimeList implements Runnable {\n  private Vector primesFound;\n  private int numPrimes, numDigits;\n\n  \/** Finds numPrimes prime numbers, each of which are\n   *  numDigits long or longer. You can set it to only\n   *  return when done, or have it return immediately,\n   *  and you can later poll it to see how far it\n   *  has gotten.\n   *\/\n\n  public PrimeList(int numPrimes, int numDigits,\n                   boolean runInBackground) {\n    \/\/ Using Vector instead of ArrayList\n    \/\/ to support JDK 1.1 servlet engines\n    primesFound = new Vector(numPrimes);\n    this.numPrimes = numPrimes;\n    this.numDigits = numDigits;\n    if (runInBackground) {\n      Thread t = new Thread(this);\n      \/\/ Use low priority so you don't slow down server.\n      t.setPriority(Thread.MIN_PRIORITY);\n      t.start();\n    } else {\n      run();\n    }\n  }\n\n  public void run() {\n    BigInteger start = Primes.random(numDigits);\n    for(int i=0; i&lt;numprimes ; i++) {\n      start = Primes.nextPrime(start);\n      synchronized(this) {\n        primesFound.addElement(start);\n      }\n    }\n  }\n\n  public synchronized boolean isDone() {\n    return(primesFound.size() == numPrimes);\n  }\n\n  public synchronized Vector getPrimes() {\n    if (isDone())\n      return(primesFound);\n    else\n      return((Vector)primesFound.clone());\n  }\n\n  public int numDigits() {\n    return(numDigits);\n  }\n\n  public int numPrimes() {\n    return(numPrimes);\n  }\n\n  public synchronized int numCalculatedPrimes() {\n    return(primesFound.size());\n  }\n}\n\nServerUtilities.java\n\npackage cwp;\n\nimport javax.servlet.*;\nimport javax.servlet.http.*;\n\n\/** Some simple time savers. Note that most are static methods.\n *  <\/p><p>\n *  Taken from Core Web Programming Java 2 Edition\n *  from Prentice Hall and Sun Microsystems Press,\n *  .\n *  May be freely used or adapted.\n *\/\n\npublic class ServletUtilities {\n  public static final String DOCTYPE =\n    &quot;&quot;;\n\n  public static String headWithTitle(String title) {\n    return(DOCTYPE + &quot;n&quot; +\n           &quot;n&quot; +\n           &quot;<title>&quot; + title + &quot;<\/title>n&quot;);\n  }\n\n  \/** Read a parameter with the specified name, convert it\n   *  to an int, and return it. Return the designated default\n   *  value if the parameter doesn't exist or if it is an\n   *  illegal integer format.\n  *\/\n\n  public static int getIntParameter(HttpServletRequest request,\n                                    String paramName,\n                                    int defaultValue) {\n    String paramString = request.getParameter(paramName);\n    int paramValue;\n    try {\n      paramValue = Integer.parseInt(paramString);\n    } catch(NumberFormatException nfe) { \/\/ null or bad format\n      paramValue = defaultValue;\n    }\n    return(paramValue);\n  }\n\n  \/** Given an array of Cookies, a name, and a default value,\n   *  this method tries to find the value of the cookie with\n   *  the given name. If there is no cookie matching the name\n   *  in the array, then the default value is returned instead.\n   *\/\n\n  public static String getCookieValue(Cookie[] cookies,\n                                      String cookieName,\n                                      String defaultValue) {\n    if (cookies != null) {\n      for(int i=0; i&lt;cookies .length; i++) {\n        Cookie cookie = cookies[i];\n        if (cookieName.equals(cookie.getName()))\n          return(cookie.getValue());\n      }\n    }\n    return(defaultValue);\n  }\n\n  \/** Given an array of cookies and a name, this method tries\n   *  to find and return the cookie from the array that has\n   *  the given name. If there is no cookie matching the name\n   *  in the array, null is returned.\n   *\/\n\n  public static Cookie getCookie(Cookie[] cookies,\n                                 String cookieName) {\n    if (cookies != null) {\n      for(int i=0; i&lt;cookies.length; i++) {\n        Cookie cookie = cookies[i];\n        if (cookieName.equals(cookie.getName()))\n          return(cookie);\n      }\n    }\n    return(null);\n  }\n\n  \/** Given a string, this method replaces all occurrences of\n   *  &#039;' with\n   *  '&gt;', and (to handle cases that occur inside attribute\n   *  values), all occurrences of double quotes with\n   *  '&quot;' and all occurrences of '&amp;' with '&amp;'.\n   *  Without such filtering, an arbitrary string\n   *  could not safely be inserted in a Web page.\n   *\/\n\n  public static String filter(String input) {\n    StringBuffer filtered = new StringBuffer(input.length());\n    char c;\n    for(int i=0; i&lt;input .length(); i++) {\n      c = input.charAt(i);\n      if (c == &#039;') {\n        filtered.append(&quot;&gt;&quot;);\n      } else if (c == '&quot;') {\n        filtered.append(&quot;&quot;&quot;);\n      } else if (c == '&amp;') {\n        filtered.append(&quot;&amp;&quot;);\n      } else {\n        filtered.append(c);\n      }\n    }\n    return(filtered.toString());\n  }\n}\n\n<\/p><\/pre>\n<p>Note: Brought from our old site: http:\/\/www.salearningschool.com\/example_codes\/ on Jan 2nd, 2017 From: http:\/\/sitestree.com\/?p=10251<br \/> Categories:Programming Code Examples, Java\/J2EE\/J2ME, Servlet<br \/>Tags:Java\/J2EE\/J2MEServlet<br \/> Post Data:2017-01-02 16:04:28<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PrimeNumbers.java Servlet that processes a request to generate n prime numbers, each with at least m digits. If these results are not complete, it sends a Refresh header instructing the browser to ask for new results a little while later. Uses the Primes, PrimeList, and ServletUtilities classes. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=26547\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-26547","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10173,"url":"http:\/\/bangla.sitestree.com\/?p=10173","url_meta":{"origin":26547,"position":0},"title":"PrimeNumbers.java Servlet that processes a request to generate n prime numbers, each with at least m digits. If these results are not complete, it sends a Refresh header instructing the browser to ask for new results a little while later. Uses the Primes","author":"","date":"August 18, 2015","format":false,"excerpt":"PrimeNumbers.java\u00a0 Servlet that processes a request to generate n prime numbers, each with at least m digits. If these results are not complete, it sends a Refresh header instructing the browser to ask for new results a little while later. Uses the Primes, PrimeList, and ServletUtilities\u00a0 classes. \u00a0 package cwp;\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26531,"url":"http:\/\/bangla.sitestree.com\/?p=26531","url_meta":{"origin":26547,"position":1},"title":"ShowRequestHeaders.java  Servlet that shows all request headers sent by browser in current request. #Programming Code Examples #Java\/J2EE\/J2ME #Servlet","author":"Author-Check- Article-or-Video","date":"April 27, 2021","format":false,"excerpt":"ShowRequestHeaders.java Servlet that shows all request headers sent by browser in current request. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; \/** Shows all the request headers sent on this request. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10166,"url":"http:\/\/bangla.sitestree.com\/?p=10166","url_meta":{"origin":26547,"position":2},"title":"ShowRequestHeaders.java Servlet that shows all request headers sent by browser in current request.","author":"","date":"August 17, 2015","format":false,"excerpt":"ShowRequestHeaders.java Servlet that shows all request headers sent by browser in current request. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; \/** Shows all the request headers sent on this request. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10262,"url":"http:\/\/bangla.sitestree.com\/?p=10262","url_meta":{"origin":26547,"position":3},"title":"ThreadedRSAKey.java Illustrates converting a method in an existing class from a single-threaded method to a multi-threaded method.","author":"","date":"August 26, 2015","format":false,"excerpt":"ThreadedRSAKey.java\u00a0 Illustrates converting a method in an existing class from a single-threaded method to a multi-threaded method. In this example, RSAKey\u00a0 computes an RSA public-private key pair, where the key size has a specified number of digits. As large prime numbers require considerable CPU time, ThreadedRSAKey converts the original computeKey\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26527,"url":"http:\/\/bangla.sitestree.com\/?p=26527","url_meta":{"origin":26547,"position":4},"title":"ThreeParams.java  Servlet that reads and displays three request (form) parameters. Uses the ServletUtilities  class. #Programming Code Examples #Java\/J2EE\/J2ME #Servlet","author":"Author-Check- Article-or-Video","date":"April 27, 2021","format":false,"excerpt":"ThreeParams.java Servlet that reads and displays three request (form) parameters. Uses the ServletUtilities class. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; \/** Simple servlet that reads three parameters from the * form data. * * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26523,"url":"http:\/\/bangla.sitestree.com\/?p=26523","url_meta":{"origin":26547,"position":5},"title":"SimplerHelloWWW.java  Servlet that uses ServletUtilities  to simplify the generation of the DOCTYPE and HEAD part of the servlet. #Programming Code Examples #Java\/J2EE\/J2ME #Servlet","author":"Author-Check- Article-or-Video","date":"April 27, 2021","format":false,"excerpt":"SimplerHelloWWW.java Servlet that uses ServletUtilities to simplify the generation of the DOCTYPE and HEAD part of the servlet. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; \/** Simple servlet that generates HTML. This variation of * HelloWWW uses the ServletUtilities utility class * to generate the DOCTYPE, HEAD, and TITLE.\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/26547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26547"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/26547\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26547"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}