Moved files to the correct location for serving

This commit is contained in:
Clinton Alexander 2016-07-13 13:42:51 +01:00
parent 7633b904ec
commit 2a4136366a
181 changed files with 8 additions and 5 deletions

View File

@ -119,13 +119,16 @@ class InterestRateSwapAPI(val services: ServiceHub) {
@Produces(MediaType.TEXT_HTML)
fun serveWeb() : Response {
try {
val resourcePath = "/web/index.html"
val resourcePath = "irswebdemo/index.html"
val resource = javaClass.getResourceAsStream(resourcePath)
val responseContent = IOUtils.toString(resource)
return Response.ok(responseContent, MediaType.TEXT_HTML_TYPE).build()
} catch(ex: Exception) {
println(ex)
if(resource != null) {
val responseContent = IOUtils.toString(resource)
return Response.ok(responseContent, MediaType.TEXT_HTML_TYPE).build()
}
return Response.status(Response.Status.NOT_FOUND).build()
} catch(ex: Exception) {
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build()
}
}
}

Some files were not shown because too many files have changed in this diff Show More