I am returning text/html(MediaType.TEXT_HTML) from REST web service which I want to show in browser.
Return string from web Service Method=<html>
<body background=\"WEB-INF\\DSCN0651.JPG\">
<h1>Hello World!!!</h1><a href="http://www.w3schools.com">Visit W3Schools.com!</a>
<audio autoplay><source src=\"WEB-INF\\Coolest_Sms_All_Time.mp3\" type="audio/mpeg"</audio>
</body></html>
- The problem I am facing is the background =
DSCN0651.JPG
is not rendered in browser - The audio autoplay is not working as I am not able to hear sound in browser.
Though I am only able to see Hello World!!!
and link www.w3schools.com
! in browser after REST call.
I checked the deployment area both image and mp3 are deployed fine under WEB-INF folder I am using IE/chrome browser to make a call to my WebService get method.
Please let me know what I am doing wrong.