java - Add Javascript to jax-rs endpoint -


i need return html code jax-rs endpoint. followed tutorials , got know can return string. problem need add javascript function returning html. how can it?

my code snippet.

return "<html><body>hello world</html></body>"  

here can add javascript function inside returning string. can follow same steps following when declaring javascript inside html page. provide example:

return "place script here hello world"

make sure put script inside tags.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -