split not working on app engine java and yet works on my Android client -


the split method returns spaces , need return elements of string can pick values want. works fine on android not on app engine. please need html array of strings no spaces. no not duplicate of other question. using right regex "\s+" import com.google.api.server.spi.config.api; import com.google.api.server.spi.config.apimethod; import com.google.api.server.spi.config.apinamespace;

import org.jsoup.jsoup; import org.jsoup.nodes.document; import org.jsoup.select.elements;  import java.util.arraylist; import java.util.list; import java.util.logging.logger;  import javax.inject.named;  /**  * endpoint class exposing  */ @api(name = "myapi", version = "v1", namespace = @apinamespace(ownerdomain = "backend.abokiforex.greatcallie.com", ownername = "backend.abokiforex.greatcallie.com", packagepath = "")) public class rateendpoint {     string[] html;     private static final logger log = logger.getlogger(rateendpoint.class.getname());     /**      * simple endpoint method takes name , says hi      */     @apimethod(name = "getrates")     public myrates getrates() {         myrates response = new myrates();         try {             document site = jsoup.connect("http://abokifx.com/").timeout(0).get();             elements tags = site.select("p");             string txt = tags.text();             html = txt.split("\\s+");         } catch (exception e) {             e.printstacktrace();         }         (int = 0; < html.length; i++){             log.info(html[i] +"\n");         }         response.setvalue1(html[18]);         response.setvalue2(html[20]);         response.setvalue3(html[21]);         response.setvalue4(html[23]);         response.setvalue5(html[24]);         response.setvalue6(html[26]);         response.setvalue7(html[97]);         response.setvalue8(html[98]);         response.setvalue9(html[99]);         response.setvalue10(html[70]);         response.setvalue11(html[71]);         response.setvalue12(html[72]);          return response;     } } 

okay here answer. app engine wasnt using utf-8(unicode) , wasnt getting regex right. defined in appengine-web xml file work


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -