java - HTTP-Get request returns HTML-Code (Google AppEngine) -


i using appengine server answer http-get requests of app, request returns html of index.html.

this doget-method:

@override public void doget(httpservletrequest req, httpservletresponse resp) throws ioexception {     string name = req.getparameter("name");     string score = req.getparameter("score");     if(score==null && name!=null){         resp.getwriter().println(name);     }     else if(name!=null && score!=null){         int p = integer.parseint(score);         addhighscore(name, p);     }     else{         resp.getwriter().println("error");     } } 

so if type url http://high-1212.appspot.com/?name=test browser, want return value of name parameter, returns web page. app not display value of parameter either, html-code. reason guess, it's because of doget-method. don't understand, what's wrong.

by default home page loaded when visit website. if want display data sending, have in response page.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -