Has any found this problem. Firefox and Chrome get directed to the HTML
output, but IE 8 is being routed to the JSON call.
class SampleResource extends ServerResource {
@Get("html")
def asHtml() = {
new StringRepresentation(<h1>Hello World</h1>.toString,
MediaType.TEXT_HTML)
}
@Get("json")
def asJson() = {
new StringRepresentation("""{"message":"hello world"}""",
MediaType.APPLICATION_JSON)
}
}
object RestlyServer {
def main(args:Array[String]) {
val component = new Component
component.getServers.add(Protocol.HTTP, 8080)
//component.getDefaultHost.attach(new blog.BlogApplication)
component.getDefaultHost.attachDefault(classOf[SampleResource])
component.start
}
}
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426468