java - XML Parsing Error: syntax error in Spark framework -


java:

package com.test;  import spark.request; import spark.response; import spark.route; import spark.spark;  public class helloworldsparkstyle {     public static void main(string[] args){         spark.get(new route("/") {             @override             public object handle(final request request, final response response) {                 return "hello spark";             }         });     } } 

running code giving following error @ localhost:4567:

xml parsing error: syntax error location: http://localhost:4567/ line number 1, column 1:  hello spark ^ 

example taken http://youtu.be/uh-vd_ypal8

try adding response.type("text/plain"); or change response value valid xml viewing in client.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -